Import Translated Files

Import and update the translations for your Salesforce org’s metadata, such as custom fields, report types, and picklist values. Or import and update data translations, such as Product names. Typically, you export translation files from Salesforce, then send them to outside translators or a translation agency for bulk translation activities. You then import the translated 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
User Permissions Needed
To export or import translation files

Manage Translation

AND

Create Documents

Note
Note You need the Manage Translation AND Create Documents user permissions to import or export translation files. If you attempt either operation without both user permissions, it’s possible to navigate to the import or export page, but the operation itself fails.

Prepare Your Translated Files:

  1. Create a separate file for each language.

    Salesforce recommends the XML Localization Interchange File Format (.xlf) for translation files.

  2. Specify the language for this translation import.

    When you export a translation file with the Bilingual or Outdated and untranslated export type, the language is already specified. If you’re importing a Source file or importing translations for a different language than the original file, update the language code.

    • For .xlf files, use the target-language attribute on the file tag. For example, <file original="Salesforce" source-language="en_US" target-language="es" datatype="xml">.

    • For .stf files, use the language code attribute at the top of the file. For example:

      # Language: Spanish
      Language code: es
      Type: Source

    Translation for the specified language must be supported for your org. For a full list of Salesforce supported languages and their language codes, see Supported Languages in Salesforce Help.

  3. If data translation is enabled in your Salesforce org, include a translation type attribute. For .xlf files, include the translation-type attribute on the file tag. For .stf files, include the translation type on its own line after the language code and type.
    Note
    Note If you export a translation file after data translation is enabled in your org, the resulting file includes this attribute.
    File Type Metadata Translation Attribute Data Translation Attribute
    XML Localization Interchange File Format (.xlf) translation-type="metadata" translation-type="data"
    Salesforce Translation Format (.stf) Translation Type: Metadata Translation Type: Data
  4. Save import files in UTF-8 encoding.
  5. Size your files.

    When importing metadata translation files, individual uncompressed files are limited to 10 MB each. When importing data translation files, individual uncompressed files are limited to 50 MB each.

  6. Bundle multiple files into .zip files.

    If data translation isn’t enabled in your org, each imported .zip file is limited to 10 MB. If data translation is enabled, each imported .zip file is limited to 1 GB. When zipping data translation files for import, each .zip file can contain up to 100,000 total translation records within up to 2 GB of uncompressed files. Create multiple .zip files as needed.

    Important
    Important Each .zip file can only contain metadata or data translation. If data translation is enabled in your org, import metadata and data translations separately.

    The zipped files don't have to be in the same order or grouping as the exported .zip files.

    For example, you start with two exported .zip files. The first file includes French, Italian, and Japanese. The second file includes Russian, Simplified Chinese, and Greek. You can create:

    • One .zip file with French, Greek, and Italian.
    • One .zip file with Russian and Greek.
    • One .zip file with Simplified Chinese.

Import Your Prepared Translated Files:

  1. From Setup, in the Quick Find box, enter Import, and then select Import under Translation Workbench.
  2. Click Choose File, and select the file you want to import.
  3. Click Import.

    After the import is complete, a confirmation email is sent to the email address specified in your profile. Wait for each import to finish before submitting another translation file for import.

    If any portion of the import fails, the email includes details about what went wrong. If the imported zip file exceeds translation import limits, the email lists the files that were imported before the limit was reached. If records within the imported translation files weren’t processed, the email lists those files and includes a link to an error log.

Verify Your Translations:

There are multiple ways to view the imported translations:

Note
Note Labels that are exported and left unchanged in the translation file aren’t saved as translations on import.
  • Check metadata labels and data translations in your Salesforce org.
  • Check metadata labels through Translation Workbench.
  • Check data translations through the Translation tab within Product.
  • Export data translations and verify your updated text. Check the labels in your Salesforce org.