SimpleLocalize CLI offers extract
command
to extract translation keys and translations from your local project files and export them to a JSON file.
The CLI will process your local files at path specified by searchDir
parameter
and search for translation keys and translations based on the projectType
you provide.
Usage
Before you start, you need to install the CLI. Follow the installation guide.
simplelocalize extract \
--projectType yahoo/react-intl \
--searchDir ./src
After running the command above, the CLI will store found translation keys and translations in a JSON file named extraction.json
.
You can upload this file to SimpleLocalize using the upload
command and simplelocalize-json
file format.
Supported libraries
Libraries from which you can extract translation keys
Library | projectType value |
---|---|
react-intl | yahoo/react-intl |
Standard Android internationalization | google/android |
Standard iOS internationalization | apple/ios-macos |
react-i18next | i18next/i18next |
mde/ejs | mde/ejs |
data-i18n-key | simplelocalize/data-i18n-key |
Was this helpful?