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.
Ім'я | Значення | Опис |
---|---|---|
language обов'язково | рядок | мовні коди Crowdin. |
xml необов'язково | рядок | Може не містити значення. Визначає те, що відповідь повинна бути в форматі XML. Тип відповіді за замовчуванням. |
json необов'язковий | рядок | Може не містити значення. Визначає, що відповідь має бути в форматі JSON. |
jsonp необов'язковий | рядок | Назва функції зворотного виклику. Визначає, що відповідь має бути в форматі JSONP. |
Variables | ||
project-identifier | рядок | Ідентифікатор проекту. |
login | рядок | Ваше ім'я користувача в Crowdin. |
account-key | рядок | API ключ вашого облікового запису. |
<?xml version="1.0" encoding="UTF-8"?>
<status>
<files>
<item>
<node_type>каталог</node_type>
<id>29812</id>
<name>Версія 1.0</name>
<files>
<item>
<node_type>файл</node_type>
<id>29827</id>
<name>strings.xml</name>
<node_type>файл</node_type>
<phrases>7</phrases>
<translated>0</translated>
<approved>0</approved>
<words>32</words>
<words_translated>0</words_translated>
<words_approved>0</words_approved>
</item>
</files>
</item>
<item>
<node_type>гілка</node_type>
<id>29824</id>
<name>Версія 2.0</name>
<files>
<item>
<node_type>файл</node_type>
<id>29826</id>
<name>strings.xml</name>
<phrases>239</phrases>
<translated>239</translated>
<approved>10</approved>
<words>1059</words>
<words_translated>1059</words_translated>
<words_approved>25</words_approved>
</item>
</files>
</item>
<item>
<node_type>файл</node_type>
<id>29825</id>
<name>description.txt</name>
<phrases>1239</phrases>
<translated>1239</translated>
<approved>100</approved>
<words>1990</words>
<words_translated>1990</words_translated>
<words_approved>309</words_approved>
</item>
</files>
</status>
<?xml version="1.0" encoding="UTF-8"?>
<error>
<code>10</code>
<message>Language was not found</message>
</error>
curl \
-F "language=fr" \
https://api.crowdin.com/api/project/{project-identifier}/language-status?login={username}&account-key={account-key}
<?php
$request_url = 'https://api.crowdin.com/api/project/{project-identifier}/language-status?login={username}&account-key={account-key}';
$post_params = array();
$post_params['language'] = 'fr';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_params);
$result = curl_exec($ch);
curl_close($ch);
echo $result;