-
Notifications
You must be signed in to change notification settings - Fork 10
Download translations
Download command takes translation from SimpleLocalize and saves them to your local files. It works similarly to the upload command
simplelocalize download
--apiKey PROJECT_API_KEY
--downloadPath DOWNLOAD_PATH
--downloadFormat FILE_FORMATThe command downloads translation files for 3 languages, as single-language-json, to ./locales directory as messages_en.json, messages_de.json, messages_fr.json
simplelocalize download
--apiKey <PROJECT_API_KEY>
--downloadPath ./src/messages_{lang}.json
--downloadFormat single-language-json
--downloadLanguageKey en,de,frChange where the exported translations should be stored using --downloadPath parameter, for example:
# one file
--downloadPath ./src/messages.json
# split by language
--downloadPath ./src/{lang}messages.json
# split by language and namespace
--downloadPath ./src/{lang}/{ns}/messages.json
Available placeholders for a download path:
-
{lang}- language key -
{ns}- namespace -
{customer}- customer key (if you are using customer translations)
You can use the placeholders as a part of a directory name, or a file name.
Change the exported translations format using --downloadFormat parameter, for example:
--downloadFormat java-properties
See list of available file formats
Choose which languages you want to export using --downloadLanguageKey parameter, for example:
--downloadLanguageKey en,pl,fr
Use language keys that you configured in the 'Languages' tab.
You can change the default sort order using --downloadSort parameter with one of those values:
-
LEXICOGRAPHICAL- sort alphabetically using the lexicographical algorithm -
NEWEST_KEYS_FIRST- sort by translation key creation date, newest first -
NEWEST_KEYS_LAST- sort by translation key creation date, oldest first -
NAMESPACES- sort by namespaces alphabetically -
IMPORT_ORDER- sort by the import order
You can download translations with specific tags using --downloadTags parameter (or simply --tags), for example:
simplelocalize upload
--downloadPath ./messages_{lang}.json
--downloadFormat single-language-json
--downloadTags Premium,Development,_none
Use _none to include translations without any tags.
Customize exported translations using options using --downloadOptions, for example:
--downloadOptions WRITE_NESTED,DEFAULT_IF_MISSING
See list of all available downloads options
Command:
simplelocalize download
--apiKey <PROJECT_API_KEY>
--downloadPath ./locales/messages.json
--downloadFormat multi-language-json
Expected output:
.
└── locales
└── messages.jsonCommand:
simplelocalize download
--apiKey <PROJECT_API_KEY>
--downloadPath ./{lang}/messages.json
--downloadFormat single-language-json
.
├── ca
│ └── messages.json
├── en
│ └── messages.json
└── es
└── messages.jsonCommand:
simplelocalize download
--apiKey <PROJECT_API_KEY>
--downloadPath /{lang}/{ns}.json
--downloadFormat single-language-json
Expected output:
.
├── it
│ ├── common.json
│ └── home.json
├── en
│ ├── common.json
│ └── home.json
└── es
├── common.json
└── home.json- Installation
- Upload translations
- Download translations
- Auto-translate
- Configuration file
- Translation Hosting
- Other commands
- Troubleshooting
- GitHub issues - bug reports
- Discord - community
- Email - support
- Changelog - product updates
- YouTube - how-to tutorials