CLI: Other commands

Last modified: April 12, 2023Author: Jakub Pomykała

Table of contents

Create a sample configuration file

Downloads the most recent sample configuration file and saves it locally as simplelocalize.yml.

simplelocalize init

Get project details

Get your project details.

simplelocalize status --apiKey <PROJECT_API_KEY>

Sample output:

Project name: 🏠 My project
Project token: 688665981f8c44668ba7bfafdd6cc142
Translated: 0.22
Keys: 13
Languages: ["de-DE","en","en-GB","en-US"]
Namespaces: ["home-en","home","email_messages"]
Customers: []
Last activity: 2023-04-12T14:21:57Z
Last edit: 2023-04-12T14:21:57Z

Auto-translate project

Start auto-translation for your project.

simplelocalize auto-translate --apiKey MY_API_KEY --languageKeys en,de,fr

The command starts an auto-translation job to translate project content. You can omit --languageKeys parameter to invoke auto-translation for all languages. Command waits until all auto-translation jobs are finished.

Auto-translate command uses settings that were used during the last auto-translation job invoked from the SimpleLocalize UI. If there was no auto-translation job invoked from the UI, the command will skip auto-translation for that language.

Translation Hosting: Publish translations

It publishes translation to Translation Hosting. It behaves exactly the same as publish buttons in the SimpleLocalize (Hosting tab).

Publishes translations from Translation Editor to the latest environment.

simplelocalize publish --apiKey <PROJECT_API_KEY> --environment latest

Publishes translations from the latest environment to production environment.

simplelocalize publish --apiKey <PROJECT_API_KEY> --environment production

Translation Hosting: Pull resources

Downloads all translation hosting files to given directory in --pullPath parameter. It overwrites existing files and creates subdirectories if necessary.

Pulls translations from the latest environment.

simplelocalize pull --apiKey <PROJECT_API_KEY> --pullPath ./hosting/ --environment latest

Pulls translations from the production environment.

simplelocalize pull --apiKey <PROJECT_API_KEY> --pullPath ./hosting/ --environment production

If you would like to filter files which should be downloaded you can use --filterRegex param, e.g.: --filterRegex '__index.json' will download only __index.json file.