translate
Translate values in your data extract from one language to another.
This guide explains how to configure the translate instruction. To learn about another instruction, go back to the Available custom script instructions overview.
Introduction
Use the translate instruction to translate values from one language to another.
The Translation standard transformation enables you to translate data between languages in a few easy steps, instead of using a custom script. For more information, see Translation.
Creating a custom script transformation using the translate instruction
To create and configure a custom script using the translate instruction, follow these steps:
-
In the Instructions step, select the translate instruction.
-
To configure the custom script instruction, fill in the following fields. Required fields are marked with an asterisk (*).
-
Field Name*
-
Enter the name of the column that contains the values to translate.
-
Target Field Name
-
Enter the name of the new column to be populated with the translated values. Leave this field empty to overwrite the original values.
-
Source Language
-
Select the language of the values to be translated. To automatically detect the language to translate, select Automatic.
-
Target Language
-
Select the language into which the values are to be translated.
-
Translator
-
Select the translation service to use. Choose one of the following:
-
Bing Translate
-
Google Translate
-
-
Errors
-
Choose how Adverity handles errors. Select one of the following:
-
Select ignore_character_limit to ignore any errors relating to character limits when translating the values.
-
Select ignore_all to ignore all errors.
-
Select raise to raise a notification if errors are found.
-
-
Subtable
-
Enter the name for a subtable that you want to use within this custom script.
A subtable is a temporary table that only exists for this custom script. You can apply additional instructions within the same custom script to the subtable. However, the subtable cannot be used in any other custom scripts.
If a subtable does not exist for the current custom script, the transformation is applied to the data extract, and the enriched data is output into the subtable. If the subtable already exists for the custom script, the subtable is used as the input for the transformation and optionally as the output.
Example
Transformation configuration
-
Field Name*
-
Animal
-
Target Field Name
-
Animal (En)
-
Source Language
-
German
-
Target Language
-
English
-
Translator
-
Google Translate
-
Errors
-
ignore_character_limit
Data table before transformation
Product |
Animal |
Items bought |
---|---|---|
Kragen |
Katze |
24 |
Kragen |
Hund |
98 |
Spielzeug |
Katze |
55 |
Spielzeug |
Hund |
73 |
Essen |
Katze |
54 |
Essen |
Kaninchen |
12 |
Essen |
Fisch |
98 |
Data table after transformation
Product |
Animal |
Items bought |
Animal (En) |
---|---|---|---|
Kragen |
Katze |
24 |
Cat |
Kragen |
Hund |
98 |
Dog |
Spielzeug |
Katze |
55 |
Cat |
Spielzeug |
Hund |
73 |
Dog |
Essen |
Katze |
54 |
Cat |
Essen |
Kaninchen |
12 |
Rabbit |
Essen |
Fisch |
98 |
Fish |