Scarica traduzioni

Download a ZIP file with translations. You can choose the language of translation you need or download all of them at once.
Note: This method downloads the ZIP file that was created during the last build. To make sure all the latest translations are included, please use Export Translations API method to build the project before downloading.
In case you wish to download translations for a single branch, make sure to build a separate ZIP file for that branch by specifying the branch name.

Richiesta

Note: Either use the combination of project identifier and project key or combination of project identifier, username, and account key to pass to this endpoint.

GET https://api.crowdin.com/api/project/{project-identifier}/download/{package}.zip?key={project-key}
GET https://api.crowdin.com/api/project/{project-identifier}/download/{package}.zip?login={username}&account-key={account-key}

Parametri

Nome Value Descrizione
ramo opzionale nella stringa Il nome del ramo versione relativo (Versioni Gestione).
Variables
identificatore-progetto nella stringa Identificatore progetto.
chiave-progetto nella stringa Project API key. Project-key o la combinazione di accesso e account-key sono obbligatori.
accesso nella stringa Il tuo nome utente su Crowdin. Project-key o la combinazione di accesso e account-key sono obbligatori.
chiave-profilo nella stringa La chiave API del tuo profilo. Project-key o la combinazione di accesso e account-key sono obbligatori.
pacchetto nella stringa Language code or "all" to download a bundle with translations to all languages.

Esempi

#Download all translations as a single ZIP archive.
wget https://api.crowdin.com/api/project/{project-identifier}/download/all.zip?key={project-key}

#Download French translations.
wget https://api.crowdin.com/api/project/{project-identifier}/download/fr.zip?key={project-key}

#Download all translations from the master branch.
wget https://api.crowdin.com/api/project/{project-identifier}/download/all.zip?key={project-key}&branch=master
<?php
ini_set('auto_detect_line_endings', 1);
ini_set('default_socket_timeout', 5); // socket timeout, just in case

file_put_contents('translations.zip', file_get_contents('https://api.crowdin.com/api/project/{project-identifier}/download/all.zip?key={project-key}'));

Questo articolo è stato utile?