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 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 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.
Purge project
Deletes all translations from the project.
simplelocalize purge --apiKey API_KEY
Adding --force
parameter will skip the confirmation prompt.
simplelocalize purge --apiKey API_KEY --force
Translation Hosting
Commands related to the Translation Hosting feature that allows you to publish translations, and fetch published resources them to your local filesystem.
Publish translations
This command publishes translations from the translation editor to the Latest environment.
simplelocalize publish --apiKey API_KEY --environment _latest
Publish translations to the Production environment from the Latest environment.
simplelocalize publish --apiKey API_KEY --environment _production
Pull translations
This command downloads all translation hosting files to a given directory in the --pullPath
parameter. It overwrites existing files and creates subdirectories if necessary.
Pulls translations from the Latest environment.
simplelocalize pull --apiKey API_KEY --pullPath ./hosting/ --environment _latest
Pulls translations from the Production environment.
simplelocalize pull --apiKey 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.