For the complete documentation index, see llms.txt. This page is also available as Markdown.

How To: Create Multilingual Documents

Output translated values with Translation Workbench, substitute, or toLabel().

Use template attributes and translated Salesforce values when documents need to match user language settings.

Problem

You need templates that display values in different languages based on user settings or picklist translations.

Solution 1: Using Translation Workbench

Setup Required:

  1. Enable Translation Workbench in Setup.

  2. Translate your picklist values.

  3. Ensure users have language preferences set.

In Your Template:

{{!Product2.Color__c translate="true"}}

If the user's language is French and Blue is translated to Bleu:

Result: Bleu

For German Documents:

<!--{{!
<lineitems>
<listname>opportunitylineitems</listname>
<column>PricebookEntry.Product2.name</column>
<column substitute="true,Ja,false,Nein">IsActive__c</column>
<column substitute="1,Januar,2,Februar,3,März,4,April,5,Mai,6,Juni,7,Juli,8,August,9,September,10,Oktober,11,November,12,Dezember">Month_Number__c</column>
</lineitems>
}}-->

Solution 3: Using SOQL with toLabel()

For Related Lists:

Tips

  • Translation Workbench follows the user's language automatically.

  • substitute is useful when Translation Workbench is not available.

  • toLabel() respects the user's language.

  • format-date month and day names always stay in English.

Last updated

Was this helpful?