Translate Document Content with Data Maps

Introduction

You can translate any Salesforce field data in your documents by creating a data translation map of key-pair values. This article will walk through the required steps for creating and using data translation maps.

Note: You can also use the Salesforce Translation Workbench to translate field labels and picklist field values. Click here for more information.

Step 1: Create A Data Translation Map

To begin, create a data translation map on the S-Docs Translation page.

If you are using S-Docs 4.381+, navigate to this page by clicking the App Launcher, typing in "S-Docs," and clicking S-Docs Setup. From there, scroll down to the Translate Data/UI section and click Go To S-Docs Translation Page.

If you are using a version of S-Docs below 4.381, the S-Docs Translation page can be accessed by adding the following URL after "salesforce.com" in your browser:

/apex/SDOC__SDConfig?translateSDocs=true

First, choose a language.

If you've defined translations for a language on this page before, you'll be able to [1] choose a language and [2] edit the translations for that language. If you haven't accessed this page before, or you want to define translations for a new language, you'll need to [3] enter the name of a language and then [4] click Define new translations for this language.

The S-Docs Translation page is broken up into two sections: [1] UI Translations, which allows you to translate the S-Docs UI that employees interact with inside of Salesforce, and [2] Data Translations, which allows you to create data translation maps for merge field values.

To keep things organized, data translation maps are grouped by section. [3] Click Add New Section to begin adding your translations.

[1] Enter a descriptive section name and [2] click Add Section.

Click Add New Field.

[1] Enter a field value and [2] click Add Field.

Enter the translated field value into the text box that appears.

Repeat this process for every field value you'd like translated. You can then add new sections or click Save.

Note that when you save a new language, two new S-Docs templates will be created.

These templates contain [1] the data translations and [2] any UI translations that you've defined, and should not be edited directly.

Step 2: Add The Translate Attribute To Your Merge Fields

Next, you must add the translate="data-map" attribute to the merge fields you want to be translated.

Example:

{{!Opportunity.CloseMonth__c translate="data-map"}}

If the merge field outputs a value included in your data map, it will be translated (even if the rest of the field contents do not have translations available).

Step 3: Add The dataLanguage Parameter to Your S-Docs Button

The last step is adding the dataLanguage parameter to your S-Docs button.

From the setup menu, navigate to the Object Manager and click the object you've defined translations for. In this example, we are using the Opportunity object.

Navigate to the Buttons, Links, & Actions tab, find your S-Docs button, and click Edit.

Then, add the following parameter to your S-Docs button URL, replacing "Language Name" with the name of your language as defined on the S-Docs Translation page:

dataLanguage='Language Name'

Since we're translating to French in our example, our button code looks like this for the Opportunity object:

{!URLFOR('/apex/SDOC__SDCreate1', null,[id=Opportunity.Id, Object='Opportunity', dataLanguage='French'])}

Click Save. When you generate documents through this button with data-map tagged merge fields, the contents will be translated.

Tags:

Was this helpful?