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

These model weights are downloaded separately and are licensed under CC BY-NC 4.0, which restricts commercial use. The LGPL below applies to this backend's code, not to the model weights.

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 LGPL 3.0 or later.

Metadata

Release files for gettext-translator-nllb 0.1.1

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.1
File Size Uploaded Provenance Actions
gettext_translator_nllb-0.1.1.tar.gz 17.9 kB With provenance Details for gettext_translator_nllb-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 38.2 kB

Release files / gettext_translator_nllb-0.1.1.tar.gz

Download URL gettext_translator_nllb-0.1.1.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0db2c1a49acb8e0429bd67cb38d5907c25944a5608991c02530d6d5adb2108a9
BLAKE2b-256 checksum
How to use checksums
a656cd2c27e30ba98c9296abc1f0ff1b0b3cc2912432f4fd6ae120c9e50f82fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

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

Download URL gettext_translator_nllb-0.1.1-py3-none-any.whl
Size 20.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aeb5b4139804963e6aab46ddc9e28ef0ec0363c791fa59f582bd94d9e8d51cc9
BLAKE2b-256 checksum
How to use checksums
91024a72c79a92821eabc8e260cd4413e468a14d77ec06ac7e4af931eec9e022
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for gettext-translator-nllb 0.1.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gettext_translator_nllb-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

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.1 This release

2 release files Full 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