PHPackages                             kynx/po-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. kynx/po-parser

ActiveLibrary[Localization &amp; i18n](/categories/localization)

kynx/po-parser
==============

Gettext \*.PO file parser for PHP.

6.1.0(today)01↑2900%MITPHPPHP ^8.3.0 || ^8.4.0 || ^8.5.0CI passing

Since Dec 8Pushed todayCompare

[ Source](https://github.com/kynx/po-parser)[ Packagist](https://packagist.org/packages/kynx/po-parser)[ Docs](https://github.com/kynx/po-parser)[ RSS](/packages/kynx-po-parser/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (4)Versions (28)Used By (0)

kynx/po-parser
==============

[](#kynxpo-parser)

[![Continuous Integration](https://github.com/kynx/po-parser/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/kynx/po-parser/actions/workflows/continuous-integration.yml)

This is a modernised fork of [sepia/po-parser](https://github.com/pherrymason/PHP-po-parser). It parses [`gettext` PO](https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html) files (\*.po files), enabling you to edit their contents using PHP.

Features
--------

[](#features)

PoParser supports following parsing features:

- header section.
- `msgid`, both single and multiline.
- `msgstr`, both single and multiline.
- `msgctxt` (Message context).
- `msgid_plural` (plurals forms).
- `#`, keys (flags).
- `#` keys (translator comments)
- `#.` keys (Comments extracted from source code).
- `#:` keys (references).
- `#|` keys (previous strings), both single and multiline.
- `#~` keys (old entries), both single and multiline.

Usage
-----

[](#usage)

```
