Index
TranslateService
(interface)DetectLanguageRequest
(message)DetectLanguageResponse
(message)DetectLanguageResponseList
(message)GetSupportedLanguagesRequest
(message)GetSupportedLanguagesResponse
(message)GetSupportedLanguagesResponseLanguage
(message)GetSupportedLanguagesResponseList
(message)TranslateTextRequest
(message)TranslateTextResponse
(message)TranslateTextResponseList
(message)TranslateTextResponseTranslation
(message)
TranslateService
Provides language translation operations.
DetectLanguage |
---|
Detects the language of text within a request.
|
GetSupportedLanguages |
---|
Returns a list of supported languages for translation.
|
TranslateText |
---|
Translates input text, returning translated text.
|
DetectLanguageRequest
The request message for language detection.
Fields | |
---|---|
q[] |
The input text upon which to perform language detection. Repeat this parameter to perform language detection on multiple text inputs. |
DetectLanguageResponse
The response message for language detection.
Fields | |
---|---|
data |
The list of language detection responses. This list will contain a language detection response for each query (q) sent in the language detection request. |
DetectLanguageResponseList
A response list contains a list of separate language detection responses.
Fields | |
---|---|
detections[] |
Language detection results for each input text piece. For backward compatibility, this list must be expressed as an array of arrays, which requires using ListValue in proto3. Example: "detections": [ [{ "language": "en", "isReliable": false, "confidence": 0.9882 }], [{ "language": "pl", "isReliable": false, "confidence": 0.5683 }] ] |
GetSupportedLanguagesRequest
The request message for discovering supported languages.
Fields | |
---|---|
target |
The language to use to return localized, human readable names of supported languages. |
model |
The |
GetSupportedLanguagesResponse
The response message for discovering supported languages.
Fields | |
---|---|
data |
A list of supported language responses. This list will contain an entry for each language supported by the Translation API. |
GetSupportedLanguagesResponseLanguage
A single supported language response corresponds to information related to one supported language.
Fields | |
---|---|
language |
Supported language code, generally consisting of its ISO 639-1 identifier. (E.g. 'en', 'ja'). In certain cases, BCP-47 codes including language + region identifiers are returned (e.g. 'zh-TW' and 'zh-CH') |
name |
Human readable name of the language localized to the target language. |
GetSupportedLanguagesResponseList
A response list contains a list of separate supported language responses.
Fields | |
---|---|
languages[] |
The set of supported languages. |
TranslateTextRequest
The main translation request message for the Cloud Translation API.
Fields | |
---|---|
q[] |
The input text to translate. Provide an array of strings to translate multiple phrases. The maximum number of strings is 128. |
source |
The language of the source text, set to one of the language codes listed in Language Support. If the source language is not specified, the API will attempt to identify the source language automatically and return it within the response. |
target |
The language to use for translation of the input text, set to one of the language codes listed in Language Support. |
format |
The format of the source text, in either HTML (default) or plain-text. A value of "html" indicates HTML and a value of "text" indicates plain-text. |
model |
The |
TranslateTextResponse
The main language translation response message.
Fields | |
---|---|
data |
A list of translation text responses. This list will contain a translation response for each query (q) sent in the request. |
TranslateTextResponseList
A response list contains a list of separate translation responses.
Fields | |
---|---|
translations[] |
The text translated into the target language. |
TranslateTextResponseTranslation
A single translation response corresponds to translation of one query (q) from a translation request.
Fields | |
---|---|
translated_text |
Text translated into the target language. |
detected_source_language |
The source language of the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language will not occur and this field will be empty. |
model |
The |