Translate

Translates input text, returning translated text

5 variables
5 variables

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 5 input parameters

  = Parameter name
  = Format

target STRING

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

q[] STRING

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

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

model STRING

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

Output

This building block provides 5 output parameters

  = 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 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

data.translations[].translatedText STRING

Text translated into the target language