New API call 'list_language_options'.
This would be a very simple-to-build API function which would return all the possible POEditor language codes and the name of that language. It would be used for customer-side picklists and display purposes which would automatically adjust as POE expands into new languages.
curl -X POST https://poeditor.com/api/ \
-d apitoken="61685b96a16c93ec30167a52a6cd579a" \
-d action="listlanguage_options" \
-d language="en"
This example would return a list of all the POE-recognized language codes and their names in English (the -d language="en" parameter would be optional, and default to English). The response would be something like
{
"response": {
"status": "success",
"code": "200",
"message": "OK"
},
"list": [
{
"name": "English",
"code": "en",
},
{
"name": "French",
"code": "fr",
},
...
{
"name": "XYZ",
"code": "xyz",
}
]
}
-
We already have a method that lists all languages available: