List
|
|||||
|
|
||||
Translates input text, returning translated text
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- Translate text from one language to another using Google Translate
- View and manage your data across Google Cloud Platform services
Input
This building block consumes 6 input parameters
| Name | Format | Description |
|---|---|---|
q Required |
STRING |
The input text to translate. Repeat this parameter to perform translation operations on multiple text inputs |
target Required |
STRING |
The language to use for translation of the input text, set to one of the language codes listed in Language Support |
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 |
cid |
STRING |
The customization id for translate |
format |
ENUMERATION |
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 |
= Parameter name
= Format
|
q STRING Required The input text to translate. Repeat this parameter to perform translation operations on multiple text inputs |
|
target STRING Required The language to use for translation of the input text, set to one of the language codes listed in Language Support |
|
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 |
|
cid STRING The customization id for translate |
|
format ENUMERATION 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 |
Output
This building block provides 5 output parameters
| Name | Format | Description |
|---|---|---|
data |
OBJECT |
The main language translation response message |
data.translations[] |
OBJECT |
|
data.translations[].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 |
data.translations[].model |
STRING |
The |
data.translations[].translatedText |
STRING |
Text translated into the target language |
= Parameter name
= Format
|
data OBJECT The main language translation response message |
|
data.translations[] OBJECT |
|
data.translations[].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 |
|
data.translations[].model STRING The |
|
data.translations[].translatedText STRING Text translated into the target language |