PHPackages                             f00b4r/php-gettext - 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. f00b4r/php-gettext

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

f00b4r/php-gettext
==================

Fixed php-gettext for PHP 5.6 - 8.0

010.1k↓40.2%1PHPCI passing

Since Mar 29Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/contributte/gettext)[ Packagist](https://packagist.org/packages/f00b4r/php-gettext)[ RSS](/packages/f00b4r-php-gettext/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Gettext emulation in PHP
========================

[](#gettext-emulation-in-php)

This library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

🕹 [f3l1x.io](https://f3l1x.io) | 💻 [f3l1x](https://github.com/f3l1x) | 🐦 [@xf3l1x](https://twitter.com/xf3l1x)

 All credits belongs to official authors, take a look at [launchpad.net/php-gettext](https://launchpad.net/php-gettext)

 [![](https://camo.githubusercontent.com/618480679fd80c822718982de2af3be0b5a524e10ff3a0cfe30b0521fc32793a/68747470733a2f2f62616467656e2e6e65742f6769746875622f636865636b732f6630306234722f7068702d676574746578742f6d61737465723f63616368653d333030)](https://github.com/f00b4r/php-gettext/actions) [![](https://camo.githubusercontent.com/7936ac1108312c98cb3b094d269816f1a776d5d4a1b7b20e5a2819ced662650f/68747470733a2f2f62616467656e2e6e65742f636f766572616c6c732f632f6769746875622f6630306234722f7068702d676574746578743f63616368653d333030)](https://coveralls.io/r/f00b4r/php-gettext) [![](https://camo.githubusercontent.com/40959cbe03bb2ec33d76b7fc8226b49e11aabd72dbf2b49ddb6cb7b14da8b4d2/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f646d2f6630306234722f7068702d67657474657874)](https://packagist.org/packages/f00b4r/php-gettext) [![](https://camo.githubusercontent.com/e9e6564ddbc71b7dc51cd66f7b7d79682cc3386f385fa8ea93b3a57948050c6f/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f762f6630306234722f7068702d67657474657874)](https://packagist.org/packages/f00b4r/php-gettext)

 [![](https://camo.githubusercontent.com/8b42bc98ffe2011e4238573a5a454c84bea607d01328b8119db42418f4b6f174/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f7068702f6630306234722f7068702d67657474657874)](https://packagist.org/packages/f00b4r/php-gettext) [![](https://camo.githubusercontent.com/8a4b5e67cf2a814191b91c8ad6f2a4e1cd2e892acfaeb4b33d207a1ffeb7d387/68747470733a2f2f62616467656e2e6e65742f6769746875622f6c6963656e73652f6630306234722f7068702d67657474657874)](https://github.com/f00b4r/php-gettext) [![](https://camo.githubusercontent.com/a8b1cd856d7d396fdebbe46947cc3507490acc267a02361e5e53bb7b820c95c3/68747470733a2f2f62616467656e2e6e65742f62616467652f737570706f72742f6769747465722f6379616e)](https://bit.ly/ctteg) [![](https://camo.githubusercontent.com/86d6416fc04f8bcc3daa7bf881526b9953b9726b1164d05c157c8713e3a73418/68747470733a2f2f62616467656e2e6e65742f62616467652f737570706f72742f666f72756d2f79656c6c6f77)](https://bit.ly/cttfo) [![](https://camo.githubusercontent.com/5d170ab94e6d594609561e16fe0f9e4293968fbd4dfcfafc5e11efc1415ef09c/68747470733a2f2f62616467656e2e6e65742f62616467652f73706f6e736f722f646f6e6174696f6e732f463936383534)](https://github.com/sponsors/f3l1x)

---

Info
----

[](#info)

- Supported PHP: [5.6 - 8.0](https://github.com/f00b4r/php-gettext/actions)
- Official project:

Installation
------------

[](#installation)

To install this library use [Composer](https://getcomposer.org/).

```
composer require f00b4r/php-gettext

```

Usage
-----

[](#usage)

```
$streamer = new CachedFileReader(__DIR__ . '/messages.mo');
$gettext = new gettext_reader($streamer);
```

Development
-----------

[](#development)

See [how to contribute](https://contributte.org/contributing.html) to this package.

This package is currently maintaining by these authors.

[ ![](https://avatars2.githubusercontent.com/u/538058?v=3&s=80)](https://github.com/f3l1x)---

Consider to [support](https://github.com/sponsors/f3l1x) **f3l1x**. Also thank you for using this package.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance55

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 80.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/538058?v=4)[Milan Šulc](/maintainers/f3l1x)[@f3l1x](https://github.com/f3l1x)

---

Top Contributors

[![f3l1x](https://avatars.githubusercontent.com/u/538058?v=4)](https://github.com/f3l1x "f3l1x (21 commits)")[![felixure](https://avatars.githubusercontent.com/u/23188301?v=4)](https://github.com/felixure "felixure (4 commits)")[![ohmyfelix](https://avatars.githubusercontent.com/u/261235610?v=4)](https://github.com/ohmyfelix "ohmyfelix (1 commits)")

---

Tags

gettextphp

### Embed Badge

![Health badge](/badges/f00b4r-php-gettext/health.svg)

```
[![Health](https://phpackages.com/badges/f00b4r-php-gettext/health.svg)](https://phpackages.com/packages/f00b4r-php-gettext)
```

###  Alternatives

[smmoosavi/php-gettext

Wrapper for php-gettext by danilo segan. This library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

1927.0k1](/packages/smmoosavi-php-gettext)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
