Source Translation Files
Use the Source file to translate an organization's labels or data for the first time. The Source file contains labels for all of a Salesforce org's translatable metadata or data in the org's default language.
Required Editions
| Metadata translation available in: Salesforce Classic and Lightning Experience |
| Data translation available in: Lightning Experience |
| Available in: Professional, Enterprise, Performance, Unlimited, and Developer Editions |
| Data translation applies to: B2B Commerce |
To prepare the translation file for your translators:
- Create one copy of the Source file for each language you’re translating into.
- In the header of each Source file, change the language code from the
organization's default language to the translation language. For example,
replace
en_USfor English (US) withesfor Spanish. - Ensure that the headers are in the organization’s default language. To confirm, export a translation file and copy the headers.
XML Localization Interchange File Format (.xlf) Source Translation Files
Source .xlf translation file content is organized into translation units. Translation
units for translated labels contain a target tag
with the translated value. Untranslated labels have a source tag, but no target tag.
Tell your translators:
- After each
sourcetag, add atargettag that contains the translated value. - If a
targettag exists and the translation is out of date, replace the text in the target tag. Outdated labels have a value ofoutOfDate="true"within the trans-unit tag. - When translating text in a rich text area field, include all HTML tags such as
<p></p>and<b></b>.
| Tag | Description | Edit Options |
|---|---|---|
trans-unit
|
Translation unit. Contains unique identifiers for the label, including the label’s id, maximum width, and out-of-date indicator. | Do not edit. |
source
|
Label or text in the org’s default language. | Do not edit. |
target
|
The current translation that’s visible to end users selecting the target language as their personal language. | Enter the translated value. Add a target tag if needed. |
note
|
Description of the metadata label, if defined in the source language. | Do not edit. Translatable field descriptions each have a separate
trans-unit tag. |
For example, if you build a custom Nickname field on the Account object, the original
file contains this trans-unit tag in the exported
Source .xlf file.
<trans-unit id="CustomField.Account.Nickname.FieldLabel" maxwidth="40" size-unit="char">
<source>Nickname</source>
<note>The person’s nickname, or what they prefer to be called.</note>
</trans-unit>To translate this label, add a target tag
containing the translated value to the corresponding trans-unit tag after the source
tag.
<trans-unit id="CustomField.Account.Nickname.FieldLabel" maxwidth="40" size-unit="char">
<source>Nickname</source>
<target>Apodo</target>
<note>The person’s nickname, or what they prefer to be called.</note>
</trans-unit>Salesforce Translation Format (.stf) Source Translation Files
Tell your translators to replace the untranslated values in the LABEL column with translated values.
| Column | Description | Edit Options |
|---|---|---|
| KEY | Unique identifier for the label. | Do not edit. |
| LABEL | Label or text in the org’s default language. | Replace untranslated values with translated values. |
For example, if you build a custom Nickname field on the Account object, the original file contains this row in the exported Source .stf file.
# KEY
|
LABEL
|
CustomField.Account.Nickname.FieldLabel
|
Nickname
|
To translate this label, replace the LABEL text in that row with the translated value.
# KEY
|
LABEL
|
CustomField.Account.Nickname.FieldLabel
|
Apodo
|

