Skip to main content

gettext-translator-nllb

NLLB backend for gettext-translator.

Usage from gettext-translator

gettext-translator --backend nllb --src es --dst de_DE --config nllb-sample.yaml --po ../../example/messages.po

This command translates the messages.po file from Spanish into German from Germany (de_DE), using the NLLB-200's 1.3B model. This plugin runs locally.

Configuration

  • model is the model to be used. See below.

Available models

Installation

pip install "gettext-translator[nllb]"

Notes

  • Plural forms: this backend translates the singular and the plural msgid separately and uses the plural translation for every form except the first one. That is right for languages with two plural forms; for languages with more (Russian, Polish, Arabic...) use an LLM backend.
  • In my tests, nllb-200-1.3B did the best contextual translation for the sample file. Bad results are obtained with the other models.

  • You might need to get a token from HuggingFace and set this environment variable in order to avoid limits:

    export HF_TOKEN=hf_xxxxxxxxxxxxxxxxx
    

License

Copyright (C) 2026 Rodolfo González González.

Licensed under GPL 3.0.

Metadata

Release files for gettext-translator-nllb 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gettext-translator-nllb 0.1.0
File Size Uploaded Provenance Actions
gettext_translator_nllb-0.1.0.tar.gz 3.9 kB Without provenance Details for gettext_translator_nllb-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gettext-translator-nllb 0.1.0
File Interpreter ABI Platform Actions
gettext_translator_nllb-0.1.0-py3-none-any.whl Python 3 none any Details for gettext_translator_nllb-0.1.0-py3-none-any.whl

Total release size: 8.8 kB

Release files / gettext_translator_nllb-0.1.0.tar.gz

Download URL gettext_translator_nllb-0.1.0.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
947705048d2334df9e225489b31a8d1ba2a48b025c07ed5e41c65fde981df8c5
BLAKE2b-256 checksum
How to use checksums
7236ea6267c36133e5660648dacbab317e4db60530bf369164aab42c75bfd929
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / gettext_translator_nllb-0.1.0-py3-none-any.whl

Download URL gettext_translator_nllb-0.1.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32eb801bbaa86828705b3e30af318e268be83883e8ff7519ddfb1b32d503d285
BLAKE2b-256 checksum
How to use checksums
a9f7b63abeb3530b272a99eced1a288a69cef7e65075d0a07924cdedcd0be798
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for gettext-translator-nllb 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page