main ← knk125:feature/argos-translation
opened 04:18PM - 22 Mar 26 UTC
Add Argos Translate Offline Machine Translation Backend (issiue: #13106)
Descr… iption
This Pull Request introduces a new offline machine translation backend utilizing [Argos Translate](https://github.com/argosopentech/argos-translate).
Argos Translate is an open-source offline translation library written in Python. It is based on OpenNMT (Open Neural Machine Translation) and runs inference locally using CTranslate2, providing high-quality translations without relying on third-party external APIs, thereby ensuring complete data privacy.
Implementation Details
Dependency Addition: Added argostranslate as an optional Python dependency under the [all] and [argos] extras in
pyproject.toml
.
Backend Engine: Created
weblate/machinery/argos.py
, which implements the
ArgosTranslation
class extending the base
MachineTranslation
engine.
The engine leverages argostranslate.translate.get_installed_languages() to dynamically determine which language pairs are locally supported via the
is_supported
method.
The
download_translations
method handles querying the local CTranslate2 models synchronously and yielding structured translation suggestions.
Registration: Registered "weblate.machinery.argos.ArgosTranslation" into the WEBLATE_MACHINERY tuple in
weblate/machinery/models.py
.
Testing methodology
Initialized a component inside a local Weblate instance and explicitly enabled the Argos Translate service within the project's machinery_settings config.
Installed the English-Spanish Argos model via Python bindings.
Passed a mock English source string unit to the API endpoint and received accurate translations on the Weblate UI under the "Automatic suggestions" tab.
No external cloud API keys are required for this engine to function since inference executes entirely on the local device's CPU/GPU.

It looks like it’s not being merged but there’s a pull request with code to add Argos Translate support to Weblate if that’s something anyone here is interested in doing. LibreTranslate uses Weblate for localization and Weblate already support translating with LibreTranslate which then uses Argos Translate to translate. So this is probably not a very useful feature, but might be useful for niche use cases.
1 Like
I was going to say, it might be useful if one doesn’t want to run another service like LibreTranslate in addition to weblate, but yeah in the end the result is more or less the same.