Name | Wert | Beschreibung |
---|---|---|
key benötigt | String | Projekt-API-Schlüssel |
project-identifier benötigt | String | Sollte die Projekt-ID enthalten. |
file benötigt | String | This parameter specifies a path to the file that should be exported from the project. |
language benötigt | String | Crowdin-Sprachcodes. |
branch optional | String | Der Name des dazugehörigen Versionszweigs (Versionsverwaltung). |
format optional | String | Specify xliff to export file in the XLIFF file format. |
export_translated_only optional | Bool. | Defines whether only translated strings will be exported to the final file. We do not recommend to set this option if you have text (*.html, *.txt, *.docx etc.) documents in your project since it may damage resulted files. Zulässige Werte sind: „0” und „1”. |
export_approved_only optional | Bool. | If set to 1 only approved translations will be exported in resulted file. Acceptable values are: 1 or 0. |
#Datei im Quelldateiformat herunterladen
wget -O de.xml "https://api.crowdin.com/api/project/{Projekt-ID}/export-file?file=en.xml&language=de&key={Projektschlüssel}"
#Datei für die Offline-Übersetzung im XLIFF-Format herunterladen
wget -O de.xliff "https://api.crowdin.com/api/project/{Projekt-ID}/export-file?file=en.html&format=xliff&language=de&key={Projektschlüssel}"
<?php
ini_set('auto_detect_line_endings', 1);
ini_set('default_socket_timeout', 5); // socket timeout, just in case
file_put_contents('it.xliff', file_get_contents('https://api.crowdin.com/api/project/{project-identifier}/export-file?file=en.html&format=xliff&language=de&key={project-key}'));