--- id: polib version: "1.2.0" license: MIT license_treatment: permissive maintenance: dormant --- # polib — A library to manipulate gettext files (po and mo files). License: permissive · Maintenance: dormant · Downloads: 7.0M/mo ## What it is and what it does polib is a pure-Python library for reading, writing, and manipulating gettext translation files in PO, POT, and MO formats. It lets you load existing translation catalogs, iterate through entries, modify or add translations, manage metadata and comments, and generate new files—all without external dependencies. The library supports Python 2.7 and Python 3.6 through 3.11, as well as PyPy. It is typically used in build pipelines, localization workflows, and translation management tools where programmatic access to gettext files is needed. You can use it to merge translation files, extract or update translations, validate catalog structure, or automate translation catalog generation as part of a continuous localization process. Use it for: - Merge or update PO files in a build pipeline to keep translations in sync with source code changes. - Programmatically extract and modify translation strings in a localization management tool or web interface. - Generate or validate MO (compiled) files from PO catalogs for deployment to production. - Automate translation workflow tasks such as marking entries as fuzzy, updating metadata, or reorganizing comments. - Parse and analyze translation coverage or completeness across multiple language catalogs. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. polib reads, writes, and manipulates gettext translation files (PO, POT, and MO formats), allowing you to load, iterate, modify entries, and create translation catalogs programmatically. Yes. polib is a stable, dependency-free library with a long track record in production use across many open-source projects. It has no known vulnerabilities, permissive licensing, and low install friction. The dormant maintenance status is not a concern for a mature, focused tool that solves a well-defined problem. Install it if you need to work with gettext files programmatically. ## Install pip install polib uv add polib poetry add polib ## Installing polib Before you install: Low install friction—pure Python wheel with no runtime dependencies. Maintenance is dormant (last release 1268 days ago), but the package is marked Production/Stable and used by many open-source projects; recent repository activity (last commit 2025-01-10) suggests it is maintained despite infrequent releases. License in practice: MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source contexts. Quickstart: pip install polib import polib pofile = polib.pofile('/path/to/pofile.po') for entry in pofile: print(entry.msgid, entry.msgstr) Verify before relying: - Whether the package handles all edge cases in modern gettext formats (e.g., pluralization rules, context-aware translations) reliably in production use. - Performance characteristics when working with very large translation files (thousands or tens of thousands of entries). ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 7.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags gettext po file manipulation, translation file parser, po mo file library, i18n translation catalog, gettext file editor, po file reader writer, localization file handling, i18n-localization, gettext-tools [View on SkillFed](https://skillfed.io/packages/polib) · [View on PyPI](https://pypi.org/project/polib/)