Learn how to generate multi-language images in seconds with Bannerly!See Bannerly.io

CLI: Download translations

Last modified: January 05, 2022Author: 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 https://get.simplelocalize.io/install | 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 \
 --apiKey PROJECT_API_KEY \
 --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

Download translations into multiple locations

simplelocalize download \
 --apiKey PROJECT_API_KEY \
 --downloadPath ./my-project \
 --downloadFormat multi-language-json \
 --downloadOptions MULTI_FILE

In this case SimpleLocalize CLI will download all translation files into your projects. This option works only if you uploaded your translations files previously with the --uploadOptions MULTI_FILE

📦 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
csv-translations CSV file with all translations
yaml yaml file format
android-xml 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

Example

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.