Translation File IDs and Keys
Each translatable item has a unique identifier in the translation file. In .xlf files, it’s the id within a trans-unit tag. In .stf files, it’s the key. The structure of these identifiers differs for metadata and data translation files.
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 |
source tag for .xlf files or the label column for .stf files. For
admins, knowing how the id or key work can help them understand how these
identifiers are structured.Metadata Translation File IDs and Keys
All translatable metadata has a setup component. Depending on the setup component, the translatable metadata can have an object, aspect, custom report type entity, flow type, flow name, and flow component.
- Metadata label translation file IDs and keys follow the format: SetupComponentName.ObjectName.AspectName.
- Metadata label translation file IDs and keys for custom report types contain the report type entity in place of the object name. The format is: SetupComponentName.CustomReportEntityName.AspectName.
- Metadata translation file IDs and keys for flows can also contain the flow component, flow type, flow name, flow version, flow screen, or flow aspect. See Flow Identifiers in Translation Files for detailed examples.
This table provides examples of metadata translation IDs and keys.
| Translation Label or Text | id (in .xlf Files) or Key (in .stf Files) |
|---|---|
| Country “Spain” in address |
AddressCountry.ES
|
| “Billing” button or link on the Account object |
ButtonOrLink.Account.Billing
|
| Label of the “Active” field on the Account object |
CustomField.Account.Active.FieldLabel
|
| Description of the “Active” field on the Account object |
CustomField.Account.Active.Description.FieldLabel
|
| Help text of the “Active” field on the Account object |
CustomField.Account.Active.Description.HelpText
|
| “Low” picklist entry in the Customer Priority picklist on the Account object |
PicklistValue.Account.CustomerPriority.Low
|
| Description of the “East Accounts” Custom Report Type |
CustomReportType.East_Accounts.Description
|
| “Accounts” Custom Report Type Layout Section on the “Accounts” Custom Report Type |
CrtLayoutSection.Custom_Accounts_Reports_1
|
| Description of the “Goal Layout” Custom Report Type Layout on the “Goals” Custom Report Type |
LayoutSection.Goal.Goal
Layout.Description_1
|
| “Survey Customers” flow name |
Flow.Flow.Survey_customers.FieldLabel
|
| “Customer Name” screen input field on version 2 of the “Survey Customer” flow |
Flow.Flow.Survey_customers.2.Survey_Customer.Field.Customer_Name.FieldLabel
|
Data Translation File IDs and keys
If data translation is enabled in your Salesforce org, the record ID is used to identify the translatable text in an exported data translation file. Data translation IDs and keys follow the format ObjectName.recordUniqueIdentifier.FieldName.
This table provides examples of data translation IDs and keys.
| Translation Label or Text | id (in .xlf Files) or Key (in .stf Files) |
|---|---|
Name of the product with record ID 01txx0000006yvEAAQ |
Product2.01txx0000006yvEAAQ.Name
|
Description of the product with record ID 01txx0000006yvEAAQ |
Product2.01txx0000006yvEAAQ.Description
|
Text stored in a custom “Discount Notes” field for the product
record ID 01txx0000006yvEAAQ |
Product2.01txx0000006yvEAAQ.Discount_Notes__c
|

