GET Language - TextKing/textking-api GitHub Wiki
Request: GET /language/{languageCode}
Returns a single language with the given ISO 639 language code. This endpoint is public and does not require authorization.
| Header | Description |
|---|---|
| Accept |
application/json or application/xml
|
| Accept-Language | The language in which the localized language name is returned. Currently the API supports de and en as valid language codes. |
| HTTP status | Description |
|---|---|
| 200 Ok | Successful request. |
| 400 Bad Request | The language code is not a valid ISO 639 language code. |
| 404 Not Found | The language with the given language code does not exist. |
Load details for the Spanish language, localized in English:
GET /v1/language/es HTTP/1.1 Host: api.textking.com Accept: application/json Accept-Language: en
Response:
HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8
Content-Language: en
{
"code": "es",
"name": "Spanish",
"localization_language": "en",
"links": [
{
"rel": "self",
"href": "https://api.textking.com/v1/language/es"
}
]
}