- DeepL auth key
- English text in JSON or RESW format
- Install
@elgato/translate
npm install @elgato/translate -g
- Create a
translations.config.jsonfile (learn more)
{
"source": "locales/en.json",
"targets": [
{
"code": "de"
},
{
"code": "fr"
}
]
}- Translate your English text.
translate -k <DEEPL_AUTH_KEY>
Main configuration that defines the source texts, and target languages.
| Name | Type | Description | Required |
|---|---|---|---|
source |
string |
Path to the English text. | ✅ |
targets |
TargetLanguage[] |
Languages to translate to. | ✅ |
formality |
"less", "prefer_less", "default", "prefer_more", "more" |
Formality of the translations. |
Target languages the source texts will be translated to.
| Name | Type | Description | Required |
|---|---|---|---|
code |
string |
Language code, learn more. | ✅ |
formality |
"less", "prefer_less", "default", "prefer_more", "more" |
Formality of the translations. | |
file |
string |
Output file. | |
glossary |
string |
DeepL glossary identifier. | |
overrides |
Override[] |
Manual overrides. |
Allows for manual translations.
| Name | Type | Description | Required |
|---|---|---|---|
text |
string |
Text that should not be translated with the remote service. | ✅ |
out |
string |
Output text; when unspecified, the original text is output. |
-k, --auth-key <auth_key>
- Default:
undefined(required) - Type: String
The DeepL authentication key used to translate text with DeepL
-c, --config <path>
- Default:
translations.config.json - Type: String
Path to the configuration file.