https://github.com/izimobil/polib
Pure python library to manipulate, create, modify gettext files (pot, po and mo files).
https://github.com/izimobil/polib
catalog gettext i18n l10n pofile python
Last synced: about 1 month ago
JSON representation
Pure python library to manipulate, create, modify gettext files (pot, po and mo files).
- Host: GitHub
- URL: https://github.com/izimobil/polib
- Owner: izimobil
- License: mit
- Created: 2017-11-27T18:01:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-01-10T08:31:03.000Z (5 months ago)
- Last Synced: 2025-04-15T00:45:31.643Z (2 months ago)
- Topics: catalog, gettext, i18n, l10n, pofile, python
- Language: Python
- Homepage:
- Size: 697 KB
- Stars: 121
- Watchers: 4
- Forks: 33
- Open Issues: 37
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG
- Contributing: docs/contributing.rst
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
=====
polib
=====|pypi-version| |pypi-stats| |build-status-image| |codecov-image| |documentation-status-image| |py-versions|
Overview
--------polib is a library to manipulate, create, modify gettext files (pot, po and mo
files). You can load existing files, iterate through it's entries, add, modify
entries, comments or metadata, etc... or create new po files from scratch.polib supports out of the box any version of python ranging from 2.7 to latest
3.X version.polib is pretty stable now and is used by many
`opensource projects `_.The project code and bugtracker is hosted on
`Github `_.polib is generously documented, you can `browse the documentation online
`_, a good start is to read
`the quickstart guide `_.Installation
~~~~~~~~~~~~Just use ``pip``:
.. code:: bash
$ pip install polib
Basic example
~~~~~~~~~~~~~.. code:: python
import polib
pofile = polib.pofile('/path/to/pofile.po')
for entry in pofile:
print(entry.msgid, entry.msgstr).. |build-status-image| image:: https://api.travis-ci.com/izimobil/polib.svg?branch=master
:target: https://app.travis-ci.com/github/izimobil/polib
:alt: Travis build.. |codecov-image| image:: https://codecov.io/gh/izimobil/polib/branch/master/graph/badge.svg
:target: https://codecov.io/gh/izimobil/polib.. |pypi-version| image:: https://img.shields.io/pypi/v/polib.svg
:target: https://pypi.python.org/pypi/polib
:alt: Pypi version.. |pypi-stats| image:: https://img.shields.io/pypi/dm/polib.svg
:target: https://pypistats.org/packages/polib
:alt: Pypi downloads.. |documentation-status-image| image:: https://readthedocs.org/projects/polib/badge/?version=latest
:target: http://polib.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status.. |py-versions| image:: https://img.shields.io/pypi/pyversions/polib.svg
:target: https://img.shields.io/pypi/pyversions/polib.svg
:alt: Python versions