For admins and template authors: send a customer a quote or invoice in their own language, with dates, numbers and amounts in the format their country uses. This takes about 30 minutes for the first language, most of it spent on translations.
Before you begin
- A working template in your main language. See Template syntax basics.
- Permission to create custom labels and translations in Setup, usually an admin. To add translations, Salesforce needs the Translation Workbench turned on with the target language added.
- The codes you need: a language code such as
frfor thelanguageparameter, and a culture code such asfr-FRfor currency and numbers. A culture code is two lowercase letters for the language, a hyphen and two uppercase letters for the country (v1.19.0). The full list is on CurrencyCulture.
How it works
Four settings work together. The template holds the tags, and the solution's Other Parameter list holds the values.
| To change… | In the template | On Assign Behaviors > Other Parameter | Reference |
|---|---|---|---|
| Fixed text, such as headings and labels | {{CustomLabel.LabelName}} | language=fr | CustomLabel |
| Currency amounts | {{FieldName \# CurrencyCulture1}} | CurrencyCulture1=fr-FR (up to CurrencyCulture5) | CurrencyCulture |
| Numbers without a currency symbol | {{FieldName \# NumberCulture1}} | NumberCulture1=nl-NL | NumberCulture |
| Dates | {{Object.DateField \@ "dd/MM/yyyy"}} | Nothing | Date format |
Docs Made Easy doesn't translate your data or text typed straight into the template. Only custom labels change with language.
Translate the fixed text
- In Setup, open Custom Labels and create a label for each piece of fixed text, for example
QuoteTitlewith the valueQuoteandQuoteTotalwith the valueTotal. - On each label, add a translation for each language, for example French
DevisandTotal. - In the template, replace the fixed text with the labels:
{{CustomLabel.QuoteTitle}},{{CustomLabel.QuoteTotal}}. - On the solution's Assign Behaviors page, click Other Parameter, then Add Other Parameter. Enter
languagein Parameter Name andfrin Parameter Value, then click Save.
Set the regional formats
- On the same Other Parameter list, add
CurrencyCulture1with a culture code, for examplefr-FR. Click Add Row for more, such asNumberCulture1. - In the template, add the switch after each amount:
{{Quote.GrandTotal \# CurrencyCulture1}}. - Add the switch after each plain number:
{{QuoteLineItem.Quantity \# NumberCulture1}}. - Add a date pattern after each date:
{{Quote.ExpirationDate \@ "dd/MM/yyyy"}}. The pattern works with or without quotes. Patterns are case-sensitive:MMis the month,mmis minutes. - Upload the template again.
Example: a French quote
Template:
{{CustomLabel.QuoteTitle}} {{Quote.QuoteNumber}}
{{CustomLabel.QuoteTotal}}: {{Quote.GrandTotal \# CurrencyCulture1}}
{{CustomLabel.QuoteValidUntil}}: {{Quote.ExpirationDate \@ "dd/MM/yyyy"}}
Other Parameters:
| Parameter Name | Parameter Value |
|---|---|
language | fr |
CurrencyCulture1 | fr-FR |
Custom labels (your data): QuoteTitle = Quote / Devis, QuoteTotal = Total / Total, QuoteValidUntil = Valid until / Valable jusqu'au.
For a quote that expires on June 3, 2025, the output shows "Devis", "Total" and "Valable jusqu'au" from the French translations, the total in the French (France) currency format, and the date as 03/06/2025.
To produce the same quote in English as well, create a second solution with the same template and language=en, CurrencyCulture1=en-US, and the date pattern you need. With en-US, an amount of 10000 shows as $10,000.00.
Verify it worked
- Generate the document from a test record. From v1.25, you can check it first with the merge preview.
- Check that every label is in the target language. If one isn't, check that the label has a translation for that language and that the
languagevalue matches it. - Check each amount, number and date against the record.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Labels show in the main language | No translation for that language, or a wrong language code | Add the translation in Setup and check the code. See CustomLabel. |
The month shows minutes, such as 03-47-2025 | mm instead of MM in the pattern | See Dates, numbers or currency show the wrong format. |
| The wrong currency symbol or separators | \# Currency uses the locale, not a fixed culture | Use \# CurrencyCulture1 with a culture code. See Currency format. |
| A tag prints as text, or a syntax error | A typo in the tag or the parameter name | Copy the syntax from the reference page. See DME-TPL-000. |
Next steps
- Dates, numbers or currency show the wrong format
- Show or hide content with IF conditions, for country-specific clauses
- Parameter types explained