sepia/po-parser
Sepia PO Parser is a PHP library for reading, writing, and updating GNU gettext .po translation files. It handles contexts, plural forms, comments, and multiline strings, making it useful for translation tools and programmatic localization workflows.
.po files programmatically — translation import/export, in-app translation editors, per-locale content management, or CMS plugins — this package collapses a deceptively fiddly parsing problem into a small dependency, letting the team spend its budget on product surface instead of file-format archaeology..po files, enabling automated pull/push jobs, merge pipelines, and CI checks without bespoke parsing code..po catalogs into a new format, normalize encoding, or reconcile string keys during an i18n refactor or platform migration.Consider it when:
.po/.pot files as data — not simply load translations at runtime.Look elsewhere when:
gettext itself, or Symfony Translation already cover this; a parser adds a layer you don’t need..resx). This is gettext-specific; a broader library or a TMS API is the better fit.To executives: This is a small, free, permissively licensed building block that unblocks localization features we would otherwise have to hand-build. It is not a strategic platform commitment — it’s a utility with low switching cost, so the downside risk is contained. Adopting it lets us ship translation-related capabilities (import/export, QA checks, admin editing) weeks earlier and avoids ongoing maintenance of a custom file-format parser. Recommendation: approve as an internal utility dependency, with a one-time engineering review of maintenance health.
To engineering: sepia/po-parser handles the tedious parts of gettext catalogs — msgid/msgstr, plurals, contexts, comments, references, fuzzy flags, and encoding — behind a straightforward API. It removes a class of avoidable bugs (multi-line strings, escaping, plural handling) that custom regex-based parsers reliably get wrong. It is scoped to parsing/serializing .po files only, so it doesn’t overlap with our runtime translation layer. Caveats to validate in a spike: PHP version support, last-release recency, and test coverage; if any of those are weak, we should plan to pin the version and be prepared to vendor. Effort to integrate is measured in hours, not sprints.
How can I help you explore Laravel packages today?