Prerequisities

  • Your app must be prepared for localization.
  • Project in Lokalise (you will need Project ID from project settings)
  • Read/write API token (generate one under your Personal profile)
  • Installed Lokalise CLI tool

In order to run the Lokalise CLI tool from grunt, you will need to set up the grunt-exec package.


Uploading to Lokalise

$ lokalise --token <token> import <project_id> --lang_iso en --file myapp/locale/en/\*.json


Downloading from Lokalise

As the translators are done you need to download the language files from Lokalise:

$ lokalise --token <token> export <project_id> --type json --use_original 1 --unzip_to myapp/locale/

You need to repeat the download for all project languages.

Did this answer your question?