Types overview

DetectLanguageRequest

The request message for language detection.
Fields
q[]

string

The input text upon which to perform language detection. Repeat this parameter to perform language detection on multiple text inputs.

DetectionsListResponse

(No description provided)
Fields
detections[]

object (DetectionsResource)

A detections contains detection results of several text

GetSupportedLanguagesRequest

The request message for discovering supported languages.
Fields
target

string

The language to use to return localized, human readable names of supported languages.

LanguagesListResponse

(No description provided)
Fields
languages[]

object (LanguagesResource)

List of source/target languages supported by the translation API. If target parameter is unspecified, the list is sorted by the ASCII code point order of the language code. If target parameter is specified, the list is sorted by the collation order of the language name in the target language.

LanguagesResource

(No description provided)
Fields
language

string

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

string

Human readable name of the language localized to the target language.

TranslateTextRequest

The main translation request message for the Cloud Translation API.
Fields
format

string

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

string

The model type requested for this translation. Valid values are listed in public documentation.

q[]

string

The input text to translate. Repeat this parameter to perform translation operations on multiple text inputs.

source

string

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

string

The language to use for translation of the input text, set to one of the language codes listed in Language Support.

TranslationsListResponse

The main language translation response message.
Fields
translations[]

object (TranslationsResource)

Translations contains list of translation results of given text

TranslationsResource

(No description provided)
Fields
detectedSourceLanguage

string

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

string

The model type used for this translation. Valid values are listed in public documentation. Can be different from requested model. Present only if specific model type was explicitly requested.

translatedText

string

Text translated into the target language.