Skip to content
On this page

Import and export

You can bring translations into Locize as files and take them out again, in the app, without any tool. To keep the files in your repository in step with Locize over time, use locize-cli instead. The files Locize reads and writes: file formats.

Import

You import on the project's Overview, into the version chosen there, or into one namespace from its ⋮ menu. The import reads the format from each file; where more than one format fits, it asks, the likeliest first, for example CSV or CSV, all languages. The file names say which language and namespace a file goes into (below); where a name does not say it, you choose. The values arrive in the editor unsaved: check them, then save.

The two switches

Two switches decide what the import may change:

The Import files dialog with the switches Keep segments that are not in the files and Add languages and namespaces from file names, and the drop area
  • Keep segments that are not in the files. On by default. Switched off, a key of your project that is missing from the files is deleted. The deletions also arrive unsaved, so you see them before you save.
  • Add languages and namespaces from file names. A language or namespace that does not exist yet is added, and the dialog lists them before you import. The switch is on for admins and for managers without a restriction to languages or namespaces; for everyone else it is off and cannot be switched. Switched off, the import goes into existing languages and namespaces only.

How the import finds the language and namespace

File nameLanguageNamespace
common.de.jsondecommon
de/common.json (a dropped folder)de, from the foldercommon
de.jsondethe version's only namespace, else you choose it
common.jsonyou choose itcommon

A file that holds all languages carries them inside: CSV, all languages, Excel (XLSX), all languages and XLIFF with all namespaces also carry the namespaces. An Apple String Catalog, all languages takes its namespace from the file name. How to build such a file yourself: CSV and XLSX.

The import takes the files themselves, not a .zip: unpack it first.

Export

You export a whole version on the project's Overview, or a single language or namespace from its ⋮ menu. The formats are grouped by what one file holds: For your code (one file per language and namespace), For translators (the source language beside each target language) and All languages in one file. An export can be narrowed to some languages and namespaces; for a format for your code, Include untranslated values decides whether empty translations are in the file. One file downloads as it is, several in one .zip.

The export holds the saved values, not changes still unsaved in the editor.

In the editor, export filtered segments exports only the keys your filters show.

Translating a file

To have a single file translated, without connecting an app: import it, let Locize translate it automatically or translate it in the editor, and export the result in the same format. The target languages must exist in the project first, or come in with the import's file names.