Node.js CLI tool to translate .json files using the DeepL API. Requires a DeepL API key.
npm install
node index [options]
- --input / -i: The input file. If left blank, uses the first .json file in the directory.
- --output / -o: The output file. If left blank, appends the target language to the source's file name. E.g. source file texts.json would become texts.fr.json if the target language is French.
- --source / -s: The source language. One of the DeepL language strings. Default auto-detect.
- --target / -t: The target language. One of the DeepL language strings. Default FR.
- --key / -k: Your DeepL API key. Can also be set as environment variable
DEEPL_API_KEY
. - --formal / -f: Flag. DeepL setting: prefer formal language. Default false.
- --properties / -p: Flag. Also translate property values. Default false.
- --confirm / -c: Flag. Ask for confirmation before launching requests. Default false.
- --debug / -d: Flag. Also log debug statements. Default false.
- --usagelimit / -u: Flag. Display your DeepL API key's usage limit after use.