Learn how to improve your localization workflow with SimpleLocalize CLI. Use CLI to download or upload translations or translation keys. Moreover, you can use 'extract' command to find translation keys in project files.
Installation
curl -s https://get.simplelocalize.io/2.0/install | bash
Script above will download the latest version and replace the current version if installed.
Usage
simplelocalize -c config.yml [COMMAND] --apiKey <PROJECT_API_KEY> rest of parameters...
You can omit -c config.yml
and provide all parameters inline, or create simplelocalize.yml
file which is loaded as default configuration.
Available commands
upload
- upload translations files,download
- download translations files,extract
- find translations and translation keys in project sources,- sync - upload and then download translations.
Sample configuration file
By default, CLI will try to load configuration from simplelocalize.yaml
file. You can override loaded file using -c
parameter before command name.
# Common
apiKey: API_KEY
# Upload command
uploadPath: ./src/translations.json
uploadFormat: multi-language-json
# Download command
downloadPath: ./src/translations.json
downloadFormat: multi-language-json
downloadOptions:
- 'WRITE_NESTED'
# Extract command
searchDir: ./src
projectType: yahoo/react-intl
ignoreKeys:
- 'WELCOME'
- 'ABOUT-US'
Authorization
Each CLI commands needs to be authorized with --apiKey
.
API Key can be found in 'Integration' tab in your project. See the screen below.
You should never expose this token to the public.