Sugjerime të automatizuara¶
Ndryshuar në versionin 4.13: Prior to Weblate 4.13, the services were configured in the Formësim.
The support for several machine translation and translation memory services is built-in. Each service can be turned on by the administrator for whole site (under Automatic suggestions in Ndërfaqe administrimi) or at the project settings:
Shënim
They come subject to their terms of use, so ensure you are allowed to use them how you want.
The services translate from the source language as configured at Component configuration, see Gjuhë burimi.
Shihni edhe
Alibaba¶
Shtuar në versionin 5.3.
- Service ID:
alibaba
- Formësim:
key
ID kyçi hyrjesh
secret
E fshehtë kyçi hyrjesh
region
ID Rajoni
Alibaba Translate is a neural machine translation service for translating text and it supports up to 214 language pairs.
Shihni edhe
Apertium APy¶
- Service ID:
apertium-apy
- Formësim:
url
URL API
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.
Shihni edhe
Amazon Translate¶
- Service ID:
aws
- Formësim:
key
ID kyçi hyrjesh
secret
Kyç të fshehte API
region
Emër rajoni
Amazon Translate is a neural machine translation service for translating text to and from English across a breadth of supported languages. The service requires the TranslateFullAccess Managed Policy.
The service automatically uses Fjalorth, see Glossaries in automatic suggestion.
Baidu¶
- Service ID:
baidu
- Formësim:
key
ID klienti
secret
E fshehtë klienti
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.
Shihni edhe
Cyrtranslit¶
Shtuar në versionin 5.7.
- Service ID:
cyrtranslit
- Formësim:
This service has no configuration.
Machine translation service using the Cyrtranslit library.
This service converts text between Cyrillic and Latin scripts for languages that have both scripts.
Shihni edhe
DeepL¶
- Service ID:
deepl
- Formësim:
url
URL API
key
Kyç API
formality
Formalitet
Përdoret formaliteti i treguar, nëse gjuha nuk është përcaktuar si (jo)formale
context
Kontekst përkthimi
Përshkruani kontekstin e përkthimit, për të përmirësuar përpikërinë e tij.
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.
API URL to use with the DeepL service. At the time of writing, there is the v1 API as well as a free and a paid version of the v2 API.
https://api.deepl.com/v2/
(default in Weblate)Is meant for API usage on the paid plan, and the subscription is usage-based.
https://api-free.deepl.com/v2/
Is meant for API usage on the free plan, and the subscription is usage-based.
https://api.deepl.com/v1/
Is meant for CAT tools and is usable with a per-user subscription.
Previously Weblate was classified as a CAT tool by DeepL, so it was supposed to use the v1 API, but now is supposed to use the v2 API. Therefore it defaults to v2, and you can change it to v1 in case you have an existing CAT subscription and want Weblate to use that.
The easiest way to find out which one to use is to open an URL like the following in your browser:
https://api.deepl.com/v2/translate?text=Hello&target_lang=FR&auth_key=XXX
Replace the XXX with your auth_key. If you receive a JSON object which contains «Bonjour», you have the correct URL; if not, try the other three.
Weblate supports DeepL formality, it will choose matching one based on the
language (for example, there is de@formal
and de@informal
).
The translation context can optionally be specified to improve translations quality. Read more on that in DeepL translation context documentatin.
The service automatically uses Fjalorth, see Glossaries in automatic suggestion.
Shihni edhe
Glosbe¶
- Service ID:
glosbe
- Formësim:
This service has no configuration.
Free dictionary and translation memory for almost every living language.
The API is gratis to use, but usage of the translations is subject to the license of the used data source. There is a limit of calls that may be done from one IP in a set period of time, to prevent abuse.
Shihni edhe
Google Cloud Translation Basic¶
- Service ID:
google-translate
- Formësim:
key
Kyç API
Machine translation service provided by the Google Cloud services.
This service uses the Google Translation API v2, and you need to obtain an API key and turn on billing in the Google API console.
Shihni edhe
Google Cloud Translation Advanced¶
- Service ID:
google-translate-api-v3
- Formësim:
credentials
Hollësi llogarie shërbimi Google Translate
Jepni një kyç JSON për llogari shërbimi.
project
Projekt Google Translate
Jepni ID-në numerike ose shkronjore të projektit tuaj Google Cloud.
location
Vendndodhje për Google Translate
Zgjidhni një rajon për Google Cloud Translation, që të përdoret për projektin Google Cloud , ose që është më afër jush.
Machine translation service provided by the Google Cloud services.
This service uses the Google Translation API v3 and you need credentials in JSON format to access it.
In order to use this service, you first need to go through the following steps:
IBM Watson Language Translator¶
Shtuar në versionin 4.16.
- Service ID:
ibm
- Formësim:
url
URL API
key
Kyç API
Sinjalizim
This service is deprecated by vendor and will be withdrawn entirely as of 10 December 2024.
IBM Watson Language Translator translates text from one language to another. The service offers multiple domain-specific models.
Shihni edhe
LibreTranslate¶
Shtuar në versionin 4.7.1.
- Service ID:
libretranslate
- Formësim:
url
URL API
key
Kyç API
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.
https://libretranslate.com/
(official public instance)Requires an API key to use outside of the website.
Shihni edhe
Azure AI Translator¶
- Service ID:
microsoft-translator
- Formësim:
key
Kyç API
base_url
URL bazë aplikacioni
Available choices:
api.cognitive.microsofttranslator.com
– Global (non-regional)api-apc.cognitive.microsofttranslator.com
– Asia Pacificapi-eur.cognitive.microsofttranslator.com
– Europeapi-nam.cognitive.microsofttranslator.com
– North Americaapi.translator.azure.cn
– Chinaapi.cognitive.microsofttranslator.us
– Azure US Government cloudendpoint_url
URL shërbimi mirëfilltësimi
Shërbime rajonalë ose disa njëherësh mund të specifikohen duke përdorur fushën e rajoneve më poshtë.
Available choices:
api.cognitive.microsoft.com
– Globalapi.cognitive.azure.cn
– Chinaapi.cognitive.microsoft.us
– Azure US Government cloudregion
Rajon shërbimi mirëfilltësimi
category
Kategori
Përcaktoni një ID të përshtatur kategorie sistemi, për t’u përdorur në vend të asaj të përgjithshme.
Machine translation service provided by Microsoft in Azure portal as a one of Cognitive Services.
Weblate implements Translator API V3.
The service automatically uses Fjalorth via dynamic dictionary, see Glossaries in automatic suggestion.
Translator Text API V2¶
The key you use with Translator API V2 can be used with API 3.
Translator Text API V3¶
You need to register at Azure portal and use the key you obtain there.
With new Azure keys, you also need to set region
to locale of your service.
You can also specify a custom category to use custom translator.
Ndihmëz
For Azure China, please use your endpoint from the Azure Portal.
Azure OpenAI¶
Shtuar në versionin 5.8.
- Service ID:
azure-openai
- Formësim:
key
Kyç API
persona
Persona përkthyesi
Përshkruan persona-n e përkthyesit, për të përmirësuar përpikërinë e përkthimit. Për shembull: “Jeni një mbarështues lopësh”.
style
Stil përkthyesi
Përshkruan stilin e përkthimit. Për shembull: “Përdorni gjuhë joformale”.
azure_endpoint
URL pikëmbarimi Azure OpenAI
URL pikëmbarimi e instancës, p.sh: https://my-instance.openai.azure.com.
deployment
Sendërtim Azure OpenAI
Emri unik i sendërtimit të modelit.
Performs translation using OpenAI hosted on Azure.
Shihni edhe
ModernMT¶
Shtuar në versionin 4.2.
- Service ID:
modernmt
- Formësim:
url
URL API
key
Kyç API
context_vector
Vektor konteksti
Listë IDs:weight kujtese, ndarë me presje. P.sh.: 1234:0.123,4567:0.456
The service automatically uses Fjalorth, see Glossaries in automatic suggestion.
Shihni edhe
MyMemory¶
- Service ID:
mymemory
- Formësim:
email
Email kontakti
username
Emër përdoruesi
key
Kyç API
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 email
.
You can also ask them for more.
Shihni edhe
Netease Sight¶
- Service ID:
netease-sight
- Formësim:
key
ID klienti
secret
E fshehtë klienti
Machine translation service provided by NetEase.
This service uses an API, and you need to obtain key and secret from NetEase.
Shihni edhe
OpenAI¶
Shtuar në versionin 5.3.
- Service ID:
openai
- Formësim:
key
Kyç API
base_url
URL bazë API OpenAI
URL bazë për API OpenAI, është tjetër nga URL-ja parazgjedhje OpenAI
model
Model OpenAI
Available choices:
auto
– Automatic selectiongpt-4o
– GPT-4ogpt-4-1106-preview
– GPT-4 Turbogpt-4
– GPT-4gpt-3.5-turbo-1106
– Updated GPT 3.5 Turbogpt-3.5-turbo
– GPT-3.5 Turbocustom
– Custom modelcustom_model
Emër modeli vetjak
E nevojshme vetëm kur është vënë si “Model vetjak”
persona
Persona përkthyesi
Përshkruan persona-n e përkthyesit, për të përmirësuar përpikërinë e përkthimit. Për shembull: “Jeni një mbarështues lopësh”.
style
Stil përkthyesi
Përshkruan stilin e përkthimit. Për shembull: “Përdorni gjuhë joformale”.
Performs translation using OpenAI.
The OpenAI API is powered by a diverse set of models with different capabilities and price points. Automatic selection chooses the best model available, but you might want to choose a specific model that matches your needs.
Use persona and style fields to further fine-tune translations. These will be used in a prompt for OpenAI and allow you to change the style of the translations.
The service automatically uses Fjalorth, see Glossaries in automatic suggestion.
Ndryshuar në versionin 5.7: Support for custom model and base URL was added.
Shihni edhe
SAP Translation Hub¶
- Service ID:
sap-translation-hub
- Formësim:
url
URL API
key
Kyç API
username
Emër përdoruesi SAP
password
Fjalëkalim SAP
enable_mt
Aktivizoni përkthim nga makina
domain
Përkatësi përkthimi
ID-ja e një përkatësie përkthimesh, për shembull, BC. Nëse nuk specifikoni një përkatësi, metoda kërkon për përkthime në krejt përkatësitë e gatshme.
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.
You can also configure whether to also use machine translation services, in addition to the term database.
Shënim
To access the Sandbox API, you need to set url
and key
.
To access the productive API, you need to set url
, username
and password
.
Systran¶
- Service ID:
systran
- Formësim:
key
Kyç API
Machine translation service provided by Systran.
This service uses an API, and you need to obtain API key at <https://translate.systran.net/en/account>.
tmserver¶
- Service ID:
tmserver
- Formësim:
url
URL API
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:
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, the default URL is
http://localhost:8888/tmserver/
.
Shihni edhe
tmserver, Installing amaGama, Amagama, Amagama Translation Memory
Weblate¶
- Service ID:
weblate
- Formësim:
This service has no configuration.
Weblate machine translation service can provide translations based on the exact matches of a string in the currently existing strings in a Translated, Approved, or Read-only states inside Weblate.
Weblate Translation Memory¶
- Service ID:
weblate-translation-memory
- Formësim:
This service has no configuration.
Use Kujtesë Përkthimesh as a machine translation service. Any string that has been translated before (or uploaded to the translation memory) can be translated in this way. This suggestion source works with fuzzy matching.
Shënim
Recreating Kujtesë Përkthimesh reduces capabilities of this TM source.
Yandex¶
- Service ID:
yandex
- Formësim:
key
Kyç API
Machine translation service provided by Yandex.
This service uses a Translation API, and you need to obtain an API key from Yandex.
Shihni edhe
Yandex v2¶
Shtuar në versionin 5.1.
- Service ID:
yandex-v2
- Formësim:
key
Kyç API
Machine translation service provided by Yandex.
This service uses a Translation API, and you need to obtain an API key from Yandex Cloud.
Shihni edhe
Youdao Zhiyun¶
- Service ID:
youdao-zhiyun
- Formësim:
key
ID klienti
secret
E fshehtë klienti
Machine translation service provided by Youdao.
This service uses an API, and you need to obtain an ID and an API key from Youdao.
Custom machine translation¶
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:
# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Machine translation example."""
import dictionary # type: ignore[import-not-found]
from weblate.machinery.base import DownloadTranslations, MachineTranslation
class SampleTranslation(MachineTranslation):
"""Sample machine translation interface."""
name = "Sample"
def download_languages(self):
"""Return list of languages your machine translation supports."""
return {"cs"}
def download_translations(
self,
source,
language,
text: str,
unit,
user,
threshold: int = 75,
) -> DownloadTranslations:
"""Return tuple with translations."""
for t in dictionary.translate(text):
yield {"text": t, "quality": 100, "service": self.name, "source": text}
You can list your own class in WEBLATE_MACHINERY
and Weblate
will start using that.