Translate Document Content
Build a translated S-Docs template with data translation maps, Translation Workbench, and translated related list values.
What You'll Learn
In this tutorial, you'll build a translated S-Docs template and test it end to end. By the end, you'll know how to:
Translate regular field output with data translation maps
Translate picklist values and field labels with Salesforce Translation Workbench
Translate related list picklist values with
toLabel()Configure template language settings correctly
Generate a test document and verify the output
What You'll Build
A template that can generate an Opportunity document in another language.
Your translated document can include:
Regular field values translated with a data map
Picklist values translated with Salesforce translations
Field labels translated in the document body
Related list picklist values translated in query output
Estimated time: 25 minutes
Prerequisites
Before you start, make sure you have:
Permission to edit S-Docs templates
Permission to manage Salesforce translations
An existing S-Docs template to test with
A sample record with data you can translate
Translation Workbench enabled in Salesforce
If you need to translate the S-Docs interface itself, see Translating the S-Docs App Menus.
Step 1: Choose a Template and a Target Language
Open the template you want to translate.
For this tutorial, use one target language such as French, German, or Spanish.
Pick a few values you want to translate first:
A regular text or formula field value
A picklist field value
A field label
A picklist field inside a related list
Keeping the first test small makes troubleshooting much easier.
Step 2: Create a Data Translation Map
Use a data translation map for regular field output that does not come from Salesforce picklist translations.
Open the App Launcher.
Search for S-Docs Setup.
Open S-Docs Setup.
Scroll to Translate Data/UI.
Click Go To S-Docs Translation Page.
Enter your language name, such as
French.Click Define new translations for this language.
In Data Translations, click Add New Section.
Enter a section name such as
Opportunity Values.Click Add New Field.
Enter the original value.
Enter the translated value.
Repeat for each value you need.
Click Save.
Example map:
North Region→Région NordRenewal Pending→Renouvellement en attenteExecutive Review→Examen de direction
When you save a new language, S-Docs creates translation template records automatically. Do not edit those records directly.
Step 3: Add Data Map Translation to Merge Fields
Add the translate="data-map" attribute to merge fields that should use your data map.
Example:
Use this on fields whose output exactly matches a value in your translation map.
If the source value is not in the map, S-Docs will output the original value.
Step 4: Set the Template Data Language
Your template must point to the same language name you created on the translation page.
Open your S-Docs template record.
Find the Data Language field.
Enter the exact language name you created earlier.
Save the template.
If your language name is French, the template must also use French.
This value must match exactly.
Step 5: Add Salesforce Translation Workbench Translations
Use Translation Workbench for picklist values and field labels.
From Salesforce Setup:
Search for Translate.
Open Translate.
Set Language to your target language.
To translate a picklist value:
Set Setup Component to Picklist Value.
Select the object.
Find the field.
Enter the translated picklist values.
Save.
To translate a field label:
Set Setup Component to Custom Field.
Set Aspect to Field Label.
Enter the translated label.
Save.
Standard Salesforce field labels usually already include Salesforce translations. Custom field labels usually need manual translation.
Step 6: Enable Template Language for Translation Workbench
Templates need a Salesforce language code when you want Translation Workbench output in generated documents.
In Setup, open Object Manager.
Open SDoc Template.
Open Page Layouts.
Edit your template layout.
Add the Language field to the template detail section.
Save the layout.
Open Fields & Relationships.
Open the Language field.
Add the language code you need, such as
FR,DE, orES.
After that, go back to the template record and select the language code.
Use FR for French, DE for German, or the code that matches your Salesforce translation language.
Step 7: Add Translation Workbench Attributes to Merge Fields
Add translate="true" to picklist merge fields and field label merge fields.
For a picklist field value:
For a field label:
Use this method for values Salesforce already knows how to translate.
Use data maps for regular text values. Use Translation Workbench for picklists and labels.
Step 8: Translate Related List Picklist Values with toLabel()
If a related list query returns a picklist value, add toLabel() in the SOQL query.
Example:
This tells Salesforce to return the translated label for that picklist field.
Keep the column name aligned with the selected field.
If you need raw query output without table formatting, use class set to none.
Step 9: Handle Unicode or Right-to-Left Output
If your translated template includes languages such as Japanese, Arabic, or Hebrew, enable Unicode support.
Open the template.
Go to Document Options.
Enable Template contains international characters (Unicode fonts).
If needed, set Unicode Enforcement Level to Strict.
For right-to-left merge field output:
For right-to-left static text and merge fields together:
If you work with right-to-left languages often, see How To: Work with Right-to-Left Languages.
Step 10: Generate a Test Document
Now test the full flow.
Open a record that matches your template.
Generate the document.
Verify each translation type:
Data map fields show translated values
Picklist fields show translated labels
Field labels display in the target language
Related list picklists display translated labels
Compare the output with the original Salesforce data.
If one translation type fails, test that part separately before changing the rest of the template.
Step 11: Fix Common Issues
Use this checklist when translations do not appear.
Data map fields stay in English
Confirm the template Data Language exactly matches the defined language name
Confirm the output value exactly matches a value in the data map
Confirm the merge field includes
translate="data-map"
Picklist values do not translate
Confirm Translation Workbench has a translation for that picklist value
Confirm the template Language field is set to the correct Salesforce language code
Confirm the merge field includes
translate="true"
Field labels do not translate
Confirm the label is available in Salesforce translations
Confirm custom field labels were translated manually
Confirm the label merge field includes
translate="true"
Related list values do not translate
Confirm the field is a picklist
Confirm the query uses
toLabel(FieldName)Confirm the template language code matches the translation language
What You've Learned
You now know how to combine both S-Docs and Salesforce translation features in one template.
You can now:
Translate regular field output with data maps
Translate picklist values and field labels with Translation Workbench
Translate related list picklists with
toLabel()Support Unicode and right-to-left output when needed
Next Steps
For deeper reference material, see:
Last updated
Was this helpful?

