2022.1

Table Of Contents
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846.)
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.
To add a comment, simply double-click the entry in the Translations pane and enter your
comment in the Comments field. Comments will be added to the POT file and are visible to
translators in their translation tools.
HTML tags in translation entries
A translation entry may contain HTML tags, for example when part of the text is styled or when
there is a hyperlink in the text. HTML tags must not be translated or removed. Normally,
translators will recognize a simple bold or italic tag (<b>...</b> or <i> ... </i> respectively), but
more complex elements like hyperlinks could cause problems. The translator may accidentally
modify the tag, and break the hyperlink for example.
Page 997