Skip to content

Machine Translation

Andreas Baumgartner edited this page May 16, 2023 · 8 revisions

Translating Services

We support multiple translation providers, such as DeepL, Google Translate, and LibreTranslate. To configure specific settings for each translation provider, you can use the following configuration options in your settings.json configuration file:

Name Website Quote
deepl https://www.deepl.com/translate see subscription plan
google https://translate.google.com/ Unlimited*
google-cn** https://translate.google.cn/ Unlimited*
libretranslate https://www.libretranslate.com/ see subscription plan

* Using the same API as the web version of translate.google.com, it seems like no quote limitations. If you are working on a huge amount of messages, please consider using an external translating tool in case of abusing.

** Same as google but for users from China

You can specify the services you want to use by (default to ["google"])

"i18n-ally.translate.engines": ["deepl", "google-cn", "google", ""]

When multiple engines are provided, it will try to use from left to right until one gets success.

DeepL Configuration

To configure DeepL as the translation provider, you can use the following options:

  • "i18n-ally.translate.deepl.apiKey": "xxx-xxx-xxx-xxx-xxx:xx": This option allows you to specify the API key for DeepL translation service. Replace "xxx-xxx-xxx-xxx-xxx:xx" with your actual DeepL API key.
  • "i18n-ally.translate.deepl.useFreeApiEntry": true: By setting this option to true, i18n-ally will use the free API endpoint for DeepL. If you have a paid DeepL API subscription, you can set this option to false.
  • "i18n-ally.translate.deepl.enableLog": false: Setting this option to false disables logging of translation requests and responses from DeepL. By default, i18n-ally logs translation requests and responses for debugging purposes. If you prefer to disable logging, you can set this option to false.

Google Translate Configuration

To configure Google Translate as the translation provider, you can use the following option:

  • "i18n-ally.translate.google.apiKey": "xxx": This option allows you to specify the API key for Google Translate. Replace "" with your actual Google Translate API key.

LibreTranslate Configuration

To configure LibreTranslate as the translation provider, you can use the following option:

  • "i18n-ally.translate.libre.apiRoot": "xxx": This option allows you to specify the API root URL for the LibreTranslate service. Replace "" with the actual API root URL of your LibreTranslate instance. Note that LibreTranslate must be set up and accessible to use this translation provider.

🧱 We are planning to add more services in the future, feel free to open PRs if you are interested in. Entry

Translation Candidates/Review

If you would like to have more control of the translated content, check out this page for more details.

Advanced Translating Options

// Default values are listed with the config options 

// Amount of translation jobs run at the same time
"i18n-ally.translate.parallels": 5,

// Prompt to select source locale on translating every time. 
// If set false, the source language in the config will be used.
"i18n-ally.translate.promptSource": false,

// Override existing messages on translating.
// If set false, no-empty keys will be ignored on batch translating.
"i18n-ally.translate.overrideExisting": false,