4 releases (2 breaking)
Uses new Rust 2024
| 0.3.0 | Oct 26, 2025 |
|---|---|
| 0.2.1 | Oct 20, 2025 |
| 0.2.0 | Oct 20, 2025 |
| 0.1.0 | Oct 20, 2025 |
#243 in Internationalization (i18n)
19KB
locale-translate
A basic utility for translating locale files using DeepL.
Installation
You'll need to install Cargo, then run
cargo install locale-translate. You may have to manually add the Cargo binary folder to your PATH,
but if all goes well the installer will do so automatically.
Usage
Start by setting up a DeepL API account and generating
an API key. Copy the key and use it to set the
DEEPL_API_KEY environment variable.
Run the tool using locale-translate. You will be prompted for your desired target language, the
name of the source locale file, and the name of the output locale file. The source file must meet
two basic requirements:
- It must be the English locale file. Other languages are currently not supported.
- It must be a JSON file with a single object that only contains simple key-value pairs, and all values must be strings.
Make sure to monitor your API usage to avoid running out of credit.
Dependencies
~12–28MB
~372K SLoC