Скачивание памяти переводов

Please consider that API 2.0 is now the preferred version to be used. The old API will remain fully functional until the end of 2021.

Crowdin API v2
Download Crowdin project Translation Memory as TMX, CSV, or XLSX file.

Запрос

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

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

Параметры

Название Значение Описание
include_assigned необязательный булево Defines whether the assigned TMs should be included in downloaded TMX file. Acceptable values are: 0, 1.
Default is 1.
source_language необязательный строка Defines a source language for language pair. Сrowdin language code should be used.
target_language необязательный строка Defines a target language for language pair. Сrowdin language code should be used.
Variables
project-identifier строка Идентификатор проекта.
login строка Ваше имя пользователя в Crowdin.
account-key строка API ключ вашего аккаунта.

Примеры

wget -O project.tmx "https://api.crowdin.com/api/project/{project-identifier}/download-tm?login={username}&account-key={account-key}"
<?php
ini_set('auto_detect_line_endings', 1); // allows file support for macintosh
ini_set('default_socket_timeout', 5); // socket timeout, just in case

file_put_contents('project.tmx', file_get_contents('https://api.crowdin.com/api/project/{project-identifier}/download-tm?login={username}&account-key={account-key}'));

Была ли эта статья полезной?