Translate API v2, REST: Translation.DetectLanguage
Detects the language of the text.
HTTP request
POST https://translate.api.cloud.yandex.net/translate/v2/detect
Body parameters
{
"text": "string",
"languageCodeHints": [
"string"
],
"folderId": "string"
}
Field |
Description |
text |
string Required field. The text to detect the language for. |
languageCodeHints[] |
string List of the most likely languages. These languages will be given preference when detecting the text language. To get the list of supported languages, use a TranslationService.ListLanguages request. |
folderId |
string ID of the folder to which you have access. |
Response
HTTP Code: 200 - OK
{
"languageCode": "string"
}
Field |
Description |
languageCode |
string The text language in ISO 639-1 To get the language name, use a TranslationService.ListLanguages request. |