YAML Import / Export

Using the YAML file format to import/export content

Within the Localize dashboard we provide you with an ability to import and export phrases and translations in various file formats.

You can also import/export Glossary terms.

To see a general explanation of how importing and exporting works in Localize, click here.

📘

UTF-8 File Format

Be sure that you are using the UTF-8 file format when working with the external files you are creating for importing purposes.

Importing Phrases or Glossary Terms

Before importing, make sure your file adheres to the file requirements below.

Navigate to the File Import / Export: Import tab in your dashboard.

  1. Drag-and-drop a file to import into the box, or select a file to import.
  2. Select YAML under File Format.
  3. Select the language you are importing.
  4. Specify the import type: Phrases or Glossary terms
  5. Click the Submit button.
  6. Wait for the file to be uploaded.
  7. Success! View the file details to see how many phrases were created, updated, etc.

After importing a source language YAML file, Localize will show the phraseKey along with the phrase in the Localize dashboard. Compound phraseKeys will be separated with periods.

730

Exporting Phrases or Glossary Terms

📘

Import First!

YAML files for the source language must first be imported into the Localize dashboard so that the phraseKeys are established. Then upon subsequent exports, the phraseKeys will be maintained.

Exporting phrases for which there is no phraseKey will result in an unusable YAML file!!!

Navigate to the File Import / Export: Export tab in your dashboard.

  1. Select YAML under File Format.
  2. Select a filter which will determine which phrases get exported:
    a. Published translations
    b. Machine translations
    c. Human translations
    d. No translations
    e. Needs human translations
  3. Select the language you are exporting.
  4. Specify the export type: Phrases or Glossary terms
  5. Click the Export button.
  6. Wait for your download to complete, then close the popup dialog.

📘

Exporting Selected Phrases

Alternatively, you can filter exactly which phrases that you want to export on the Phrases page. Find out how...


File Requirements

For YAML files, the import/export tools assume one language per file.

  • YAML is one of the file formats that Localize supports with key: value pairs for phrases.
  • Exporting a YAML file will preserve the key: value structure which was previously imported.
  • Keys can also be nested.
  • The phrase key will be visible within the phrases listing, and in the information panel for a phrase.

Use the following sample for guidance when creating your YAML files for importing into Localize.

The following data is required:

  • [language code]: the language code for the file
  • key: value pairs:
    • the key specifies the "name" of the phrase
    • the value specifies the content of the phrase
en:
  welcome: Hello
  signup: Sign up
  contact:
    email: Email address
    phone: 555-123-4567

The equivalent Spanish file:

es:
  welcome: Hola
  signup: Regístrate
  contact:
    email: Dirección de correo electrónico
    phone: 555-123-4567

📘

Not available in Web projects

The YAML file format is not available in Web-based projects, because it is a format traditionally used in mobile app development.


Troubleshooting

If your import fails you can view the error here under Import History.