Skip to main content
Skip table of contents

Using Document Translation

The Dynamo Template can utilize two types of translation resources: document translation and Salesforce translation.

Document translation is an internal resource managed through the template builder. It provides a translation matrix that is independent of any external translations. Salesforce translation is a resource managed in the Salesforce Translation Workbench and then imported into the template.


Using Document translation

Translation tab

The Translation tab can be found in the Data Source tab on the right side of the document template editor. If translation is not enabled, click "Enable Translation."

The Translation tab displays the "Add Translation" button and all available translations under the translation resource name, which is typically "labels."

Adding translations

New document translations can be added by selecting an element (without assigned dynamic content) or by selecting/painting an inline area. After that, pressing the "Add Translation" button will open the "Add Translation" dialog. The dialog will display defaults for the translation key, text, and language. By clicking "OK," a new translation will be added for the defined language in the translation matrix. The new translation key will appear in the "Translation" data source, and the selected element is linked to the translation key through the "Content" attribute.

Document translations can also be defined in the translation section. Clicking the "Translation Part Tile" in the "Dashboard" view or the edit button in the "Translation" tab will open the translation editor. Translations are presented using a matrix with a single translation key column and several language columns. Each language has its own column where the first-row value is used as the language key. It's recommended to use ISO 639-1 language codes like en (English), de (German), fi (Finnish). Other translation matrix rows present translation texts. The translation key in the first column is used to map the translation text to the document.

If the language key or translation key is not found, the placeholder text will remain in the document output.

Creating translations from document

When the translation matrix is not yet defined, the document can be created using one of the desired languages. After the document is ready, the text can be divided into translations with unique keys. Every translated element needs its own translation key and text. If the full text spans over several paragraphs, each paragraph needs its own translation key and text. Translated paragraphs cannot contain inline (static or dynamic) elements. If the translated area needs to have dynamic content, then the area must be divided into two different parts.

The easiest way to add translations is by clicking "Add Translation" in the "Translation" tab.

Defining language

When the translation mapping is in place, the element content will be replaced with language text. The language is selected using, for example, a field value from Salesforce. If the value matches the language key, that language will be used.

The translation matrix variable and the correct language are selected and initialized with the <setTranslation> command. This command must exist before the <composeContent> command to be effective. The language attribute value must match one of the translation matrix column keys.

When translation is enabled from the translation tab, the <setTranslation> command will be added to the main flow, and the language attribute is set to use the "documentLanguage" variable. The document language is set by default to "en." This variable can be located in the variables tab. Any Salesforce field could be used to control the selected language, as long as the field values match language keys. The template designer could also add more complex mappings between Salesforce values and language keys by using choose-when-otherwise logic.

Please note that the content visible in the template’s mapped elements is just placeholder text that will be replaced when the document is generated.

Translating picklist values

After enabling the Dynamo document translation feature, to utilize Dynamo document translation on picklist values, please follow the 2 steps below:

  • Add translations for each of the API values of the picklist field into the translation matrix.

  • In the template document part where you map the picklist field, wrap the field inside labels[] tag (screenshot below) so that when the template evaluates all the dynamic fields, the field's value will be used as a key in the translation matrix.


By default, when you map a picklist field into the template, the API value is displayed in the generated document. This picklist translation instruction is for this default case.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.