Built-in support for several machine translation services and can be turned on by the administrator using MT_SERVICES
for each one. They come subject to their terms of use, so ensure you are allowed to use them how you want.
The source language can be configured at project
.
Special installation of tmserver
run by the authors of Virtaal.
Turn on this service by adding weblate.machinery.tmserver.AmagamaTranslation
to MT_SERVICES
.
amagama:installation
, virtaal:amagama
, amaGama Translation Memory
A libre software machine translation platform providing translations to a limited set of languages.
The recommended way to use Apertium is to run your own Apertium-APy server.
Turn on this service by adding weblate.machinery.apertium.ApertiumAPYTranslation
to MT_SERVICES
and set MT_APERTIUM_APY
.
MT_APERTIUM_APY
, Apertium website, Apertium APy documentation
3.1
Amazon Translate is a neural machine translation service for translating text to and from English across a breadth of supported languages.
- Turn on this service by adding
weblate.machinery.aws.AWSTranslation
toMT_SERVICES
. - Install the boto3 module.
- Configure Weblate.
MT_AWS_REGION
, MT_AWS_ACCESS_KEY_ID
, MT_AWS_SECRET_ACCESS_KEY
Amazon Translate Documentation
3.2
Machine translation service provided by Baidu.
This service uses an API and you need to obtain an ID and API key from Baidu to use it.
Turn on this service by adding weblate.machinery.baidu.BaiduTranslation
to MT_SERVICES
and set MT_BAIDU_ID
and MT_BAIDU_SECRET
.
MT_BAIDU_ID
, MT_BAIDU_SECRET
Baidu Translate API
2.20
DeepL is paid service providing good machine translation for a few languages. You need to purchase DeepL API
subscription or you can use legacy DeepL Pro (classic)
plan.
Turn on this service by adding weblate.machinery.deepl.DeepLTranslation
to MT_SERVICES
and set MT_DEEPL_KEY
.
Hint
In case you have subscription for CAT tools, you are supposed to use "v1 API" instead of default "v2" used by Weblate (it is not really an API version in this case). In case you are on a free instead of a paid plan, you have to use https://api-free.deepl.com/
instead of https://api.deepl.com/
You can adjust both parameters by MT_DEEPL_API_URL
.
MT_DEEPL_KEY
, MT_DEEPL_API_URL
, DeepL website, DeepL pricing, DeepL API documentation
4.7.1
LibreTranslate is a free and open-source service for machine translations. The public instance requires an API key, but LibreTranslate can be self-hosted and there are several mirrors available to use the API for free.
Turn on this service by adding weblate.machinery.libretranslate.LibreTranslateTranslation
to MT_SERVICES
and set MT_LIBRETRANSLATE_API_URL
. If your instance requires an API key, you must also set MT_LIBRETRANSLATE_KEY
.
MT_LIBRETRANSLATE_KEY
, MT_LIBRETRANSLATE_API_URL
, LibreTranslate website, LibreTranslate repository, LibreTranslate mirrors
Free dictionary and translation memory for almost every living language.
The API is gratis to use, but subject to the used data source license. There is a limit of calls that may be done from one IP in a set period of time, to prevent abuse.
Turn on this service by adding weblate.machinery.glosbe.GlosbeTranslation
to MT_SERVICES
.
Machine translation service provided by Google.
This service uses the Google Translation API, and you need to obtain an API key and turn on billing in the Google API console.
To turn on this service, add weblate.machinery.google.GoogleTranslation
to MT_SERVICES
and set MT_GOOGLE_KEY
.
MT_GOOGLE_KEY
, Google translate documentation
Machine translation service provided by Google Cloud services.
This service differs from the former one in how it authenticates. To enable service, add weblate.machinery.googlev3.GoogleV3Translation
to MT_SERVICES
and set
MT_GOOGLE_CREDENTIALS
MT_GOOGLE_PROJECT
If location fails, you may also need to specify MT_GOOGLE_LOCATION
.
MT_GOOGLE_CREDENTIALS
, MT_GOOGLE_PROJECT
, MT_GOOGLE_LOCATION
Google translate documentation
2.10
Machine translation service provided by Microsoft in Azure portal as a one of Cognitive Services.
Weblate implements Translator API V3.
To enable this service, add weblate.machinery.microsoft.MicrosoftCognitiveTranslation
to MT_SERVICES
and set MT_MICROSOFT_COGNITIVE_KEY
.
The key you use with Translator API V2 can be used with API 3.
You need to register at Azure portal and use the key you obtain there. With new Azure keys, you also need to set MT_MICROSOFT_REGION
to locale of your service.
MT_MICROSOFT_COGNITIVE_KEY
, MT_MICROSOFT_REGION
, Cognitive Services - Text Translation API, Microsoft Azure Portal
2.19
The Microsoft Terminology Service API allows you to programmatically access the terminology, definitions and user interface (UI) strings available in the Language Portal through a web service.
Turn this service on by adding weblate.machinery.microsoftterminology.MicrosoftTerminologyService
to MT_SERVICES
.
4.2
Turn this service on by adding weblate.machinery.modernmt.ModernMTTranslation
to MT_SERVICES
and configure MT_MODERNMT_KEY
.
ModernMT API, MT_MODERNMT_KEY
, MT_MODERNMT_URL
Huge translation memory with machine translation.
Free, anonymous usage is currently limited to 100 requests/day, or to 1000 requests/day when you provide a contact e-mail address in MT_MYMEMORY_EMAIL
. You can also ask them for more.
Turn on this service by adding weblate.machinery.mymemory.MyMemoryTranslation
to MT_SERVICES
and set MT_MYMEMORY_EMAIL
.
MT_MYMEMORY_EMAIL
, MT_MYMEMORY_USER
, MT_MYMEMORY_KEY
, MyMemory website
3.3
Machine translation service provided by NetEase.
This service uses an API, and you need to obtain key and secret from NetEase.
Turn on this service by adding weblate.machinery.youdao.NeteaseSightTranslation
to MT_SERVICES
and set MT_NETEASE_KEY
and MT_NETEASE_SECRET
.
MT_NETEASE_KEY
, MT_NETEASE_SECRET
NetEase Sight Translation Platform
You can run your own translation memory server by using the one bundled with Translate-toolkit and let Weblate talk to it. You can also use it with an amaGama server, which is an enhanced version of tmserver.
- First you will want to import some data to the translation memory:
2. Turn on this service by adding weblate.machinery.tmserver.TMServerTranslation
to MT_SERVICES
.
build_tmdb -d /var/lib/tm/db -s en -t cs locale/cs/LC_MESSAGES/django.po
build_tmdb -d /var/lib/tm/db -s en -t de locale/de/LC_MESSAGES/django.po
build_tmdb -d /var/lib/tm/db -s en -t fr locale/fr/LC_MESSAGES/django.po
- Start tmserver to listen to your requests:
tmserver -d /var/lib/tm/db
- Configure Weblate to talk to it:
MT_TMSERVER = "http://localhost:8888/tmserver/"
MT_TMSERVER
, tt:commands/tmserver
amagama:installation
, virtaal:amagama
, Amagama Translation Memory
Machine translation service provided by Yandex.
This service uses a Translation API, and you need to obtain an API key from Yandex.
Turn on this service by adding weblate.machinery.yandex.YandexTranslation
to MT_SERVICES
, and set MT_YANDEX_KEY
.
MT_YANDEX_KEY
, Yandex Translate API, Powered by Yandex.Translate
3.2
Machine translation service provided by Youdao.
This service uses an API, and you need to obtain an ID and an API key from Youdao.
Turn on this service by adding weblate.machinery.youdao.YoudaoTranslation
to MT_SERVICES
and set MT_YOUDAO_ID
and MT_YOUDAO_SECRET
.
MT_YOUDAO_ID
, MT_YOUDAO_SECRET
Youdao Zhiyun Natural Language Translation Service
Weblate can be the source of machine translations as well. It is based on the Woosh fulltext engine, and provides both exact and inexact matches.
Turn on these services by adding weblate.machinery.weblatetm.WeblateTranslation
to MT_SERVICES
.
2.20
The translation-memory
can be used as a source for machine translation suggestions as well.
Turn on these services by adding weblate.memory.machine.WeblateMemory
to the MT_SERVICES
. This service is turned on by default.
Machine translation service provided by SAP.
You need to have a SAP account (and the SAP Translation Hub enabled in the SAP Cloud Platform) to use this service.
Turn on this service by adding weblate.machinery.saptranslationhub.SAPTranslationHub
to MT_SERVICES
and set the appropriate access to either the sandbox or the production API.
Note
To access the Sandbox API, you need to set MT_SAP_BASE_URL
and MT_SAP_SANDBOX_APIKEY
.
To access the productive API, you need to set MT_SAP_BASE_URL
, MT_SAP_USERNAME
and MT_SAP_PASSWORD
.
MT_SAP_BASE_URL
, MT_SAP_SANDBOX_APIKEY
, MT_SAP_USERNAME
, MT_SAP_PASSWORD
, MT_SAP_USE_MT
SAP Translation Hub API
You can also implement your own machine translation services using a few lines of Python code. This example implements machine translation in a fixed list of languages using dictionary
Python module:
../../weblate/examples/mt_service.py
You can list your own class in MT_SERVICES
and Weblate will start using that.