Translate API v2, gRPC: TranslationService.DetectLanguage
Detects the language of the text.
gRPC request
rpc DetectLanguage (DetectLanguageRequest) returns (DetectLanguageResponse)
DetectLanguageRequest
{
"text": "string",
"language_code_hints": [
"string"
],
"folder_id": "string"
}
Field |
Description |
text |
string Required field. The text to detect the language for. |
language_code_hints[] |
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. |
folder_id |
string ID of the folder to which you have access. |
DetectLanguageResponse
{
"language_code": "string"
}
Field |
Description |
language_code |
string Most languages are specified in ISO 639-1 To get the language name, use a TranslationService.ListLanguages request. |