Export File

This method exports single translated files from Crowdin. Additionally, it can be applied to export XLIFF files for offline localization.

Request

GET https://api.crowdin.com/api/project/{project-identifier}/export-file?key={project-key}

Parameters

Name Value Description
key required string Project API key
project-identifier required string Should contain the project identifier.
file required string This parameter specifies a path to the file that should be exported from the project.
language required string Crowdin language code.
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. Acceptable values are: 1 or 0.
export_approved_only optional bool If set to 1 only approved translations will be exported in resulted ZIP file. Acceptable values are: 1 or 0.

Examples

#Download file in the same file format as source
wget -O de.xml "https://api.crowdin.com/api/project/{project-identifier}/export-file?file=en.xml&language=de&key={project-key}"

#Download file for offline translation in XLIFF file format
wget -O de.xliff "https://api.crowdin.com/api/project/{project-identifier}/export-file?file=en.html&format=xliff&language=de&key={project-key}"
<?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}'));