Übersetzungsstatus

Track overall translation and proofreading progresses of each target language. Default response format is XML.

Anfrage

Hinweis: Entweder der Projektschlüssel oder die Kombination aus Nutzername und Kontoschlüssel can be passed to this endpoint. Projekt-ID is passed in both cases.

POST https://api.crowdin.com/api/project/{Projekt-ID}/status?key={Projektschlüssel}
POST https://api.crowdin.com/api/project/{Projekt-ID}/status?login={Nutzername}&account-key={Kontoschlüssel}

Parameter

Name Wert Beschreibung
xml optional string May contain no value. Defines that response should be in XML format.
json optional string May contain no value. Defines that response should be in JSON format.
jsonp optional string Callback function name. Defines that response should be in JSONP format.
Variablen
project-identifier benötigt string Projekt-ID.
project-key optional string Der Projekt-API-Schlüssel. Entweder project-key oder die Kombination aus username und account-key wird benötigt.
username optional string Ihr Nutzername in Crowdin. Entweder project-key oder die Kombination aus username und account-key wird benötigt.
account-key optional string Ihr Konto-API-Schlüssel. Entweder project-key oder die Kombination aus username und account-key wird benötigt.

Antwort

Wenn die Methode erfolgreich war, gibt sie eine XML-Struktur zurück, so wie unten zu sehen.
<?xml version="1.0" encoding="ISO-8859-1"?>
<status>
  <language>
    <name>French</name>
    <code>fr</code>
    <phrases>20</phrases>
    <translated>10</translated>
    <approved>5</approved>
    <words>50</words>
    <words_translated>35</words_translated>
    <words_approved>15</words_approved>
    <translated_progress>50</translated_progress>
    <approved_progress>25</approved_progress>
  </language>
  <language>
    <name>Romanian</name>
    <code>ro</code>
    <phrases>20</phrases>
    <translated>0</translated>
    <approved>0</approved>
    <words>50</words>
    <words_translated>35</words_translated>
    <words_approved>15</words_approved>
    <translated_progress>0</translated_progress>
    <approved_progress>0</approved_progress>
  </language>
  <!-- ............each project language............-->
</status>
If Qualitätskontrollen is enabled, this method returns the following XML structure:
<?xml version="1.0" encoding="ISO-8859-1"?>
<status>
  <language>
    <name>French</name>
    <code>fr</code>
    <phrases>20</phrases>
    <translated>10</translated>
    <approved>5</approved>
    <words>50</words>
    <words_translated>35</words_translated>
    <words_approved>15</words_approved>
    <translated_progress>50</translated_progress>
    <approved_progress>25</approved_progress>
    <qa_issues>10</qa_issues>
  </language>
  <!-- ............each project language............-->
</status>
Beispiel einer fehlgeschlagenen Antwort:
<?xml version="1.0" encoding="ISO-8859-1"?>
<error>
  <code>3</code>
  <message>API key is not valid</message>
</error>

Beispiele

curl https://api.crowdin.com/api/project/{Projekt-ID}/status?key={Projektschlüssel}&jsonp=mycallback
<?php
$request_url = 'https://api.crowdin.com/api/project/{project-identifier}/status?key={project-key}&xml';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);

$result = curl_exec($ch);
curl_close($ch);

echo $result;

War dieser Artikel hilfreich?