CLI: Download translations

Last modified: April 16, 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/2.0/install | bash

Do you have troubles with CLI? See troubleshooting section.

πŸ‘¨β€πŸ’» Usage

simplelocalize -c config.yml download --apiKey <PROJECT_API_KEY> ...

Download translations using CLI

Example: Download translations into one file

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

Learn more about multi-language-json.

Example: Download translations into multiple directories

.
β”œβ”€β”€ ca
β”‚   └── translations.json
β”œβ”€β”€ en
β”‚   └── translations.json
└── es
    └── translations.json
simplelocalize download \
 --apiKey PROJECT_API_KEY \
 --downloadPath ./{lang}/translations.json \
 --downloadFormat single-language-json

Example: Download translations into multiple directories and files

.
β”œβ”€β”€ ca
β”‚   β”œβ”€β”€ common.json
β”‚   └── home.json
β”œβ”€β”€ en
β”‚   β”œβ”€β”€ common.json
β”‚   └── home.json
└── es
    β”œβ”€β”€ common.json
    └── home.json
simplelocalize download \
 --apiKey PROJECT_API_KEY \
 --downloadPath ./{lang}/{ns}.json \
 --downloadFormat single-language-json

See all available download formats

Download options

Many download formats offers additional options. You can activate them using --downloadOptions parameter.

simplelocalize download \
 --apiKey PROJECT_API_KEY \
 --downloadPath ./translations.json \
 --downloadFormat multi-language-json \
 --downloadOptions WRITE_NESTED,INCLUDE_DESCRIPTIONS

See all available download options