Simple JSON Import / Export

Using the Simple JSON 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.

📘

React-intl

The Simple JSON file format can be easily used in projects that use the react-intl library.

Importing Phrases

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

To import a Simple JSON file:

  1. Navigate to the File Import / Export: Import tab in your dashboard.
  2. Select SIMPLE JSON under File Type.
  3. Select the language you are importing.
  4. Specify the import type: Phrases or Glossary terms
  5. Specify the file to import.
  6. Click the Submit button.

After importing the English source file, Localize will show the phraseKey along with the phrase in the Localize dashboard.

Exporting Phrases

📘

Import First!

Simple JSON files for the source language must first be imported into the Localize dashboard so that the keys from your file are added as phraseKeys in the phrase in the Localize dashboard. Then upon subsequent exports, the phraseKeys will be maintained.

Exporting phrases for which there is no phraseKey will result in the source language string being used as the key which is probably not a desirable outcome!!!

To export a Simple JSON file:

  1. Navigate to the File Import / Export: Export tab in your dashboard.
  2. Select SIMPLE JSON under File Type.
  3. 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
  4. Select the language you are exporting.
  5. Specify the export type: Phrases or Glossary terms
  6. Click the Export button.

📘

Exporting Selected Phrases

Alternatively, you can filter exactly which phrases that you want to export on the Phrases and/or Glossary pages. Find out how...


File Requirements

Simple JSON is a format that's used to exchange data between participants in a translation project.
Use the following sample for guidance when creating your Simple JSON file for importing into Localize.

The following data is required:

  • "key"="value": for each string in your app
    • key is a unique ID for the string
    • value is the actual text of the string

Sample Simple JSON file in the source language of English:

{
  "last_name_field": "Last Name",
  "first_name_field": "First Name",
  "submit_button": "Submit"
}

Sample Simple JSON file in the target language of Spanish:

{
  "last_name_field": "Apellido",
  "first_name_field": "Nombre",
  "submit_button": "Enviar"
}

Troubleshooting

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

Updated 10 days ago


Simple JSON Import / Export


Using the Simple JSON file format to import/export content

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.