Simple JSON Import / Export for Mobile

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.

📘

React-intl

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

Importing / Exporting

To see a general explanation of how importing and exporting works in Localize, click here. Be sure to adhere to the file requirements below so that Localize will be able to successfully read your files.

📘

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!!!

File Requirements

🚧

UTF-8 Character Encoding

Be sure that you are using the UTF-8 character encoding when working with the external files you are creating for importing purposes, so that special characters like accents are encoded properly.

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
      • Keys can also be nested
    • value is the actual text of the string
{
  "new-user": {
    "submit-button": "Submit",
    "click-submit": "Click on the Submit button"
  },
  "welcome": "Welcome to our site!"
}
{
  "new-user": {
    "submit-button": "Enviar",
    "click-submit": "Haga clic en el botón Enviar"
  },
  "welcome": "¡Bienvenido a nuestro sitio!"
}

Troubleshooting

If your import fails an error message will be displayed. Later, you can also view the error here under Import History.