Google Translate

The Google Translate component provides an integrations pathway with Google’s Cloud Translation services, which translates phrases into other languages.

Credentials

To authenticate, you need the apiKey from your Google cloud platform account.

Read more information about Google API keys at the following location; https://cloud.google.com/docs/authentication/api-keys

You will need to create a new (or use an existing) GCP project and enable the Google Cloud Translation API.

Read Google’s How to create new project documentation for instructions: https://cloud.google.com/resource-manager/docs/creating-managing-projects

Triggers

This component has no trigger functions. This means it will not be accessible to select as a first component during the integration flow design.

Actions

When specifying the language in a Configure input section, use two- or three-letter locale codes. Some examples are shown below:

Language Two-letter code Three-letter code

English

en

eng

Russian

ru

rus

French

fr

fra

Other language codes are found by executing the Retrieve supported languages action.

Translate phrase

In/Out metadata can be found at /lib/schemas/translatePhrase.<IN/OUT>.json.

The sourceLang field is optional. Google will autodetect the source locale if not specified.

Translate phrase

Detect language

In/Out metadata can be found at /lib/schemas/detectLanguage.<IN/OUT>.json.

Detect language

Retrieve supported languages

Out metadata can be found at /lib/schemas/retrieveSupportedLanguages.out.json.

Translate object properties

In/Out metadata can be found at /lib/schemas/translateObjectProperties.<IN/OUT>.json.

Translate object properties
Input example
{
    "sourceObject": {
        "hello": "hello world",
        "capital": "London is the capital of Great Britain"
    },
    "sourceLang": "en",
    "targetLang": "de"
}
Output example
{
    "hello": "Hallo Welt",
    "capital": "London ist die Hauptstadt von Großbritannien"
}

Translate array of objects

In/Out metadata can be found at /lib/schemas/translateObjectProperties.<IN/OUT>.json.

Translate array of objects
Input example
{
	"sourceArray": [
		{
            "hello": "hello world",
            "capital": "London is the capital of Great Britain"
		},
		{
			"color": "red",
			"mood": "great mood"
		}
	],
	"sourceLang": "en",
	"targetLang": "de"
}
Output example
{
    "translatedArray": [
    	{
    		"capital": "London ist die Hauptstadt von Großbritannien",
    		"hello": "Hallo Welt"
    	},
    	{
    		"mood": "großartige Stimmung",
    		"color": "rot"
    	}
    ]
}