Skip to content
Docs

Import a file

Bring translations in from a JSON or Flutter ARB file.

Everyone2 min read

Import brings translations in from a file you already have, one language at a time. Keys that don't exist yet are created.

Before you start

  • The language must exist in the project. If it doesn't, add it first.
  • The file is nested JSON or a Flutter ARB file. Flat JSON with dots in its key names, such as "home.title", is refused: nest it as {"home": {"title": …}}. See File formats.

Import a file

  1. Open Import

    In the Editor, select Import. It's also in the ⌘K command palette and in the project overview's menu on a phone.

  2. Choose what to import

    • Target language: the language the file holds.
    • Format: JSON or ARB (Flutter).
    • File: select the drop area, or drop the file on it. Files up to 10 MB. Picking a .json or .arb file sets the format for you.

    Once a file and language are chosen, the dialog warns that the import overwrites the language's existing values.

  3. Import

    Select Import. When it finishes the dialog shows how many keys were imported, added and updated, such as "Imported 24 keys" and "18 added, 6 updated. All landed as Draft." Select Import another for the next file, or Done.

What import does

  • New keys are created. In every other language they start empty.
  • Values in the file replace the values in Localizator, also values someone already wrote or reviewed. Values that are the same are left alone.
  • Imported values become Draft, written by a person (source Human). Empty values in the file become Untranslated.
  • Keys that are in Localizator but not in the file are not touched. Import never deletes anything.
  • The import is recorded in the activity log, and Google Drive is synced if it's connected.
Import overwrites

Import from the app always replaces existing values with the file's. To only fill empty cells, push the file through the public API with overwrite=false.

When import fails

What you seeWhat to do
"Select a file and target language"Pick both before selecting Import
"That file is over 10 MB. Split it and import the parts."Split the file and import each part
"Import timed out"Large files can take a while. Try again, or split the file
"Import failed" with a reasonThe file isn't valid JSON or ARB, or its keys aren't valid. Fix the file and try again

Related