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 enrichment 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 enrichment using the translate instruction

To create and configure a custom script using the translate instruction, follow these steps:

  1. Create a custom script enrichment.

  2. In the Instructions step, select the translate instruction.

  3. 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 enrichment 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 enrichment and optionally as the output.

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