Lingue supportate

Get supported languages list with Crowdin codes mapped to locale name and standardized codes.

Richiesta

GET https://api.crowdin.com/api/supported-languages

Parametri

Nome Value Descrizione
xml optional nella stringa May not contain value. Defines that response should be in XML format. Predefinito.
json optional nella stringa May not contain value. Defines that response should be in JSON format.
jsonp optional nella stringa Callback function name. Defines that response should be in JSONP format.

Response

If successful, this method returns a XML structure, as it is shown below.
<?xml version="1.0" encoding="UTF-8"?>
<languages>
  <language>
    <name>Rumeno</name>
    <crowdin_code>ro</crowdin_code>
    <iso_639_1>ro</iso_639_1>
    <iso_639_3>ron</iso_639_3>
    <locale>ro-RO</locale>
    <android_code>ro-rRO</android_code>
    <osx_code>ro.lproj</osx_code>
    <osx_locale>ro</osx_locale>
  </language>
  <language>
    <name>French</name>
    <crowdin_code>fr</crowdin_code>
    <iso_639_1>fr</iso_639_1>
    <iso_639_3>fra</iso_639_3>
    <locale>fr-FR</locale>
    <android_code>fr-rFR</android_code>
    <osx_code>fr.lproj</osx_code>
    <osx_locale>fr</osx_locale>
  </language>
  <language>
    <name>Spanish</name>
    <crowdin_code>es-ES</crowdin_code>
    <iso_639_1>es</iso_639_1>
    <iso_639_3>spa</iso_639_3>
    <locale>es-ES</locale>
    <android_code>es-rES</android_code>
    <osx_code>es.lproj</osx_code>
    <osx_locale>es</osx_locale>
  </language>
  <language>
    <name>Afrikaans</name>
    <crowdin_code>af</crowdin_code>
    <iso_639_1>af</iso_639_1>
    <iso_639_3>afr</iso_639_3>
    <locale>af-ZA</locale>
    <android_code>af-rZA</android_code>
    <osx_code>af.lproj</osx_code>
    <osx_locale>af</osx_locale>
  </language>
  <!-- other languages -->
</languages>
Campione di risposta non riuscita:
<?xml version="1.0" encoding="UTF-8"?>
<error>
  <code>2</code>
  <message>Unknown API action</message>
</error>

Esempi

curl https://api.crowdin.com/api/supported-languages
<?php
$request_url = 'https://api.crowdin.com/api/supported-languages';

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

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

print_r($result);

Questo articolo è stato utile?