Covered in this article
Related pages
Latest Changelog
Version 2.0.0 ()
Google-translate component

Google-translate component

Google translate component for the platform.

Credentials

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

You can find how to create new project here:

In order to authenticate, you need to get apiKey in your Google cloud platform account. Note that only the API KEY type is supported so far.

To enable the translation API do the following:

  1. Go to the Google Cloud Console -> APIs & Services -> Enabled APIs & services.
  2. Click + ENABLE APIS AND SERVICES.
  3. In the search field type Cloud Translation API and select this serivce.
  4. Click Enable.

To get the key follow these steps:

  1. Go to the Google Cloud Console -> APIs & Services -> Credentials.
  2. Create a new API KEY credentials.

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 codes for that. For example,

english -> en
russian -> ru
franch -> fr
-----
english -> eng
russian -> rus
franch -> fra

Such codes can be foud in a result of Retrieve supported languages action execution

Detect language

Detects language of the text (phrase) provided.

Detect language

Input Metadata:

  • Phrase - (string, required): Text to detect language of.

Output Metadata:

  • result - (object, required): The result object containing output data. Output body is generated by Google Translate.
    • input - (string, required): Input text.
    • language - (string, required): Detected language.
    • confidence - (number, required): Confidence of the detection.

Retrieve Supported Languages

Retrieve languages supported by Google Translate. Returns an array of languages code and name.

Supported Languages

Output Metadata:

  • result - (array, required): An array of objects describing the languages supported.
    • code - (string, required): Code of the language. E.g. uk.
    • name - (string, required): Name of the language. E.g. Ukrainian.

Translate Array of Texts:

Translate a batch of texts (strings). Works the same as the Translate Phrase, the only difference is that you can provide an array of texts instead of a single string.

Translate Array of Texts

Input Metadata:

  • Source Array - (array, required): Array of texts (strings) to translate. E.g. [‘Hi there’, ‘I am a component’].
  • Source Language - (string, optional): Language of the text to translate. Will be detected automatically if not specified. See the allowed values (retrieves dynamically). E.g. en.
  • Target Language - (string, required): Language to translate into. See the allowed values (retrieves dynamically). E.g. uk.

Output Metadata

  • result - (array, required): The result array containing translated text string from the input message. The order of the strings remains the same.

Translate Phrase

Translate the text (phrase) provided. Provide the text to translate, the language to translate into and, optionally, the language to translate from. If the source language is not specified, it will be detected by Google Translate automatically.

Translate phrase

Input Metadata

  • Phrase - (string, required): Text to translate.
  • Source Language - (string, optional): Language of the text to translate. Will be detected automatically if not specified. See the allowed values (retrieves dynamically). E.g. en.
  • Target Language - (string, required): Language to translate into. See the allowed values (retrieves dynamically). E.g. uk.

Output Metadata

  • result - (string, required): The result object containing translation of the incoming phrase.

Technical Notes

The technical notes page gives some technical details about Google-translate component like changelog.