Weblate has built in support for several machine translation services and it's up to the administrator to enable them. The services have different terms of use, so please check whether you are allowed to use them before enabling them in Weblate. The individual services are enabled using MT_SERVICES
.
The source language can be configured at project
.
Special installation of tmserver
run by Virtaal authors.
To enable this service, add weblate.machinery.tmserver.AmagamaTranslation
to MT_SERVICES
.
virtaal:amagama
, Amagama Translation Memory
A free/open-source machine translation platform providing translation to a limited set of languages.
The recommended way to use Apertium is to run your own Apertium APy server.
To enable this service, add 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.
To enable this service, add weblate.machinery.aws.AWSTranslation
to MT_SERVICES
, install the boto3 module and set the settings.
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 ID and API key from Baidu.
To enable this service, add 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 few languages. According to some benchmark it's currently best available service.
To enable this service, add weblate.machinery.deepl.DeepLTranslation
to MT_SERVICES
and set MT_DEEPL_KEY
.
MT_DEEPL_KEY
, DeepL website, DeepL API documentation
Free dictionary and translation memory for almost every living language.
API is free to use, but subject to the used data source license. There is a limit of calls that may be done from one IP in fixed period of time, to prevent abuse.
To enable this service, add weblate.machinery.glosbe.GlosbeTranslation
to MT_SERVICES
.
Machine translation service provided by Google.
This service uses Translation API and you need to obtain an API key and enable billing on Google API console.
To enable this service, add weblate.machinery.google.GoogleTranslation
to MT_SERVICES
and set MT_GOOGLE_KEY
.
MT_GOOGLE_KEY
, Google translate documentation
2.10
Note
This service is deprecated by Microsoft and has been replaced by ms-cognitive-translate
.
Machine translation service provided by Microsoft, it's known as Bing Translator as well.
You need to register at Azure market and use Client ID and secret from there.
To enable this service, add weblate.machinery.microsoft.MicrosoftTranslation
to MT_SERVICES
.
MT_MICROSOFT_ID
, MT_MICROSOFT_SECRET
, Bing Translator, Azure datamarket
2.10
Note
This is replacement service for ms-translate
.
Machine transation service provided by Microsoft in Azure portal as a one of Cognitive Services.
You need to register at Azure portal and use the key you obtain there.
To enable this service, add weblate.machinery.microsoft.MicrosoftCognitiveTranslation
to MT_SERVICES
and set MT_MICROSOFT_COGNITIVE_KEY
.
MT_MICROSOFT_COGNITIVE_KEY
, 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 on the Language Portal through a web service.
To enable this service, add weblate.machinery.microsoftterminology.MicrosoftTerminologyService
to MT_SERVICES
.
Huge translation memory with machine translation.
Free, anonymous usage is currently limited to 100 requests/day, or to 1000 requests/day when you provide contact email in MT_MYMEMORY_EMAIL
. You can also ask them for more.
To enable this service, add weblate.machinery.mymemory.MyMemoryTranslation
to MT_SERVICES
and set MT_MYMEMORY_EMAIL
.
MT_MYMEMORY_EMAIL
, MT_MYMEMORY_USER
, MT_MYMEMORY_KEY
, MyMemory website
You can run your own translation memory server which is bundled with Translate-toolkit and let Weblate talk to it. You can also use it with amaGama server, which is an enhanced version of tmserver.
First you will want to import some data to the translation memory:
To enable this service, add 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
Now you can start tmserver to listen to your requests:
tmserver -d /var/lib/tm/db
And configure Weblate to talk to it:
MT_TMSERVER = 'http://localhost:8888/tmserver/'
MT_TMSERVER
, tt:commands/tmserver
virtaal:amagama
, Amagama Translation Memory
Machine translation service provided by Yandex.
This service uses Translation API and you need to obtain API key from Yandex.
To enable this service, add 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 ID and API key from Youdao.
To enable this service, add 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 source of machine translation as well. It is based on the fulltext engine Whoosh and provides both exact and inexact matches.
To enable these services, add weblate.machinery.weblatetm.WeblateTranslation
to MT_SERVICES
.
2.20
The translation-memory
can use used as source for machine translation suggestions as well.
To enable these services, add weblate.memory.machine.WeblateMemory
to the MT_SERVICES
. This service is enabled by default.
Machine translation service provided by SAP.
You need to have a SAP account (and enabled the SAP Translation Hub in the SAP Cloud Platform) to use this service.
To enable this service, add weblate.machinery.saptranslationhub.SAPTranslationHub
to MT_SERVICES
and set appropriate access to either sandbox or productive 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 translation to a fixed list of languages using dictionary
Python module:
../../examples/mt_service.py
You can list own class in MT_SERVICES
and Weblate will start using that.