CLI: Download translations

Last modified: July 24, 2021Author: Jakub Pomykała

Download translations to your local files using CLI. Choose the best matching file format for your project. Invoke 'download' command to get the latest version of translations.

download translations

💿 Installation

Install SimpleLocalize CLI

curl -s | bash

Problems with CLI? See troubleshooting section.

👨‍💻 Usage

Download all language translations into one file

simplelocalize download \
  --apiKey <PROJECT_API_KEY> \
  --downloadFormat multi-language-json \
  --downloadPath ./all-translations.json

Learn more about multi-language-json.

Download one language translations into one file

simplelocalize download \
  --apiKey <PROJECT_API_KEY> \
  --downloadFormat multi-language-json \
  --downloadPath ./english-translations.json \
  --languageKey en

Learn more about single-language-json.

Download all language translations into multiple files

simplelocalize download \
 --downloadPath ./my-{lang}-translations.json \
 --downloadFormat single-language-json

In this case SimpleLocalize CLI will take all your project language keys and fetch translations for each of them. After that each translation file will be saved in a directory specified in --uploadPath with specified format: my-{languageKey}-translations.json
Thanks to that, you can download all files at once.

📦 Available --downloadFormat values

downloadFormat Description
multi-language-json JSON file with all translations
single-language-json JSON file with one language (use languageKey param to specify language)
excel Microsoft Excel spreadsheet in *.xlsx format
yaml yaml file format
android XML Resource Strings file
localizable-strings Localizable.strings file format
java-properties Java properties file
po-pot PO/POT files
php-array PHP Array file
module-exports module.exports file


CLI download

🖊 How to change file names

If you selected format which provides more than one file, then the file name will contain language key which is set in SimpleLocalize Web (Languages tab). Change the language key and download translations again using CLI to get translation file with changed name.

Example command usage

simplelocalize download \
 --apiKey PROJECT_API_KEY \ 
 --downloadPath ./translations_{lang}.json \ 
 --downloadFormat single-language-json

Learn how to upload translations using CLI. Optionally, you can also check how to import translations using API.