translate
Translate values in your data extract from one language to another.
Introduction
Use the translate enrichment to translate values from one language to another.
A simplified version of this enrichment is used in the simplified Translate enrichment.For more information, see Translation.
Creating the enrichment
For more information on creating an enrichment, see Using custom scripts.
Configuring the enrichment
To configure the enrichment, 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 contain the enriched data. The enrichment is applied to the whole data extract, then the enriched data is output into the subtable you have named here.
This subtable is a temporary table, which means it 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.
Example
Enrichment 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 enrichment
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 enrichment
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 |