2021.2

Table Of Contents
The description is added to the <data-translate> attribute of the HTMLelement in which the
source text is located, as its value, for example: <data-translate="Table">.
Note that a translation will only be applied if the value of the <data-translate> attribute of the
respective HTML element is exactly the same as the given Context (case-sensitive).
Tagging text in snippets
If the text that you want to tag for translation is located in a snippet, do not tag it in the section
where the snippet is used. Instead, open the snippet (see "Snippets" on page741) and tag the
elements inside the snippet as described above.
Tagging text that is inserted by a script
OLConnect will also apply translations to content that is inserted by personalization scripts, but
only if that content is marked for translation, and if there is a matching translation entry.
1. On the Translations pane, click on the New Empty String button to create the translation
entry.
2. Make sure that any element in which the text is inserted, are tagged for translation. There
are several ways to do that:
l Let the script insert the tagged HTML element as well as the text, for example:
results.html( "<p data-translate>Bill to @CustNumber@</p>"
);.
l If the script inserts text into an existing, empty HTML element, switch to the Source
view and add the data-translate attribute to the element (e.g. <p id="p1" data-
translate>).
Data placeholders in translation entries
A translation entry may include placeholders for data fields, e.g. "Dear @name@". (For more
information about placeholders see "Variable Data" on page805.)
Placeholders must not be translated; otherwise the personalization script will no longer replace
them with data
Typically, translators are familiar with entries that contain variables, but you may add a
comment explaining that the placeholder is used as a variable and that it should not be
translated.
Page 940