Get Started

Gemini Translate (Large Language Model)

Using Google Gemini LLM to translate content to any language.

About

The Gemini text translation component is designed to translate any field from content to a specified target language represented by a two-letter short form (ISO 3166-1 alpha-2 code). The translated text will be presented in the field enrichment.text_translationby default. It should be noted that we can use this component in both real-time and batch-processing manners.

Adding to your Dynamic Pipeline

This Component can be added to your Dynamic pipelines through the "Gemini 1.5 Translate" component. It requires the following fields for configuration:

  • Destination Path (Required): the metadata field for the output of the translation. By default, it is set to `enrichment.text_translation'. The field can be an existing field, or the component can create a new field for this functionality.
  • Target language (Required): the target language for translation (in the form of ISO-3166-1 alpha-2 code)
  • Source language (Required): the source language of the input document (in the form of ISO-3166-1 alpha-2 code)
  • Target Text (Required): This is the field for the input text that is supposed to be translated to the target language. Any metadata field can be chosen as an input based on data sources.

If the Gemini translation encounters safety issues with certain content, you will see the placeholder [translation_blocked_token_x_to_y] within the translated text.

The following example shows the dynamic pipeline configuration for the Google Gemini 1.5 Translate component used to translate if you have the Unify as the previous step, you can use the example in the image.

In this example:

  • content.body from the input document is set as the “Target Text” for translation

  • EN is set for input language

  • FR is set for the target language of translation

  • enrichment.text_translation is set as the destination path for the output of the translation



Compatible Languages

The language coverage is continuously improved as this component uses Google Gemini 1.5 to translate in the back end. Referring to https://ai.google.dev/gemini-api/docs/models/gemini#gemini-1.5-flash the language coverage is:


LanguageLanguage ID (ISO-639)
Arabicar
Bengalibn
Bulgarianbg
Chinesezh
Croatianhr
Czechcs
Danishda
Dutchnl
Englishen
Estonianet
Finnishfi
Frenchfr
Germande
Greekel
Hebrewiw
Hindihi
Hungarianhu
Indonesianid
Italianit
Japaneseja
Koreanko
Latvianlv
Lithuanianlt
Norwegianno
Polishpl
Portuguesept
Romanianro
Russianru
Serbiansr
Slovaksk
Sloveniansl
Spanishes
Swahilisw
Swedishsv
Thaith
Turkishtr
Ukrainianuk
Vietnamesevi