FindSoftware

Gettext

PHP library that imports, edits and exports gettext translations in PO, MO and other formats.

Gettext is a PHP library that imports, edits and exports gettext translations. Loaders read PO and MO files into a collection of translations, each with its original text, translation, plural forms, references and comments, and generators write the collection back out. Scanners extract new strings from source files. A merge combines a scan with an existing PO file, and the options decide which translations, headers, comments, flags and references are kept.

The package includes no scanner. Scanners for PHP and JS sources, and a JSON format, are separate packages that the README names.

Worth knowing

A strict PO loader fails on syntax errors and warns about plural counts and missing headers, so it can serve as a linter for PO files in a build. It is about 50% slower than the default loader.

Identity

Status
Active
Maintainer
Oscar Otero Marzoa2
First release
20133

Rendering and deploy

Install with
composer4

Releases

Current major version
56
Last release
2024-12-016

Adoption

GitHub stars
7031
Packagist downloads
36,755,9748
Contributors
547
Dependent repositories
1,4579
Dependent packages
999

Why these figures do not compare

Sources

  1. 2026-11-16: links, Written in, GitHub stars
    api.github.com/repos/php-gettext/Gettext
  2. 2026-11-16: Maintainer
    github.com/php-gettext/Gettext/blob/master/LICENSE
  3. 2026-11-16: First release
    api.github.com/repos/php-gettext/Gettext/tags?per_page=100
  4. 2026-11-16: Categories, Runtime, Install with
    github.com/php-gettext/Gettext/blob/master/README.md
  5. 2026-11-16: Minimum runtime, License
    github.com/php-gettext/Gettext/blob/v5.7.3/composer.json
  6. 2026-11-16: Current major version, Last release
    api.github.com/repos/php-gettext/Gettext/releases
  7. 2026-11-16: Contributors
    api.github.com/repos/php-gettext/Gettext/contributors?per_page=1
  8. 2026-11-16: Packagist downloads
    packagist.org/packages/gettext/gettext.json
  9. 2026-11-16: Dependent packages, Dependent repositories
    packages.ecosyste.ms/api/v1/registries/packagist.org/packages/gettext%2Fgettext

Last reviewed · Listed since Edit on GitHubThis page as markdownas JSON