PHPackages                             azatoth/php-pgettext - 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. azatoth/php-pgettext

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

azatoth/php-pgettext
====================

Extension of gettext functions for PHP like pgettext, dpgettext, etc.

v1.0(11y ago)7115.7k—6.3%5[1 PRs](https://github.com/azatoth/php-pgettext/pulls)3MITPHPPHP &gt;=5.3.0

Since Dec 5Pushed 11y ago4 watchersCompare

[ Source](https://github.com/azatoth/php-pgettext)[ Packagist](https://packagist.org/packages/azatoth/php-pgettext)[ Docs](https://github.com/azatoth/php-pgettext)[ RSS](/packages/azatoth-php-pgettext/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (3)

pgettext and buddies
====================

[](#pgettext-and-buddies)

Default installation of `gettext` in php lacks support for `pgettext` et al. This php script adds support for those, as well as an `gettext_noop` wrapper.

For this to work when extracting strings using `xgettext`, many keyword parameters needs to be filed, A wrapper script called `php-xgettext` might be used to simplify this.

Following functions are exported:

- `pgettext($msg_ctxt, $msgid)`
- `dpgettext($domain, $msg_ctxt, $msgid)`
- `dcpgettext($domain, $msg_ctxt, $msgid, $category)`
- `npgettext($msg_ctxt, $msgid, $msgid_plural, $n)`
- `dnpgettext($domain, $msg_ctxt, $msgid, $msgid_plural, $n)`
- `dcnpgettext($domain, $msg_ctxt, $msgid, $msgid_plural, $n, $category)`
- `gettext_noop($msgid)`

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4182d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fc9395b8ebd847c13aff2af7b18661fa677054257d81a894c5ecc1c0a72a7cb?d=identicon)[AzaToth](/maintainers/AzaToth)

---

Top Contributors

[![azatoth](https://avatars.githubusercontent.com/u/146477?v=4)](https://github.com/azatoth "azatoth (4 commits)")[![unkind](https://avatars.githubusercontent.com/u/1517363?v=4)](https://github.com/unkind "unkind (1 commits)")

---

Tags

library

### Embed Badge

![Health badge](/badges/azatoth-php-pgettext/health.svg)

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

###  Alternatives

[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M495](/packages/illuminate-translation)[larswiegers/laravel-translations-checker

Make sure your laravel translations are checked and are included in all languages.

256423.2k2](/packages/larswiegers-laravel-translations-checker)[inpsyde/multilingual-press

Simply THE multisite-based free open source plugin for your multilingual websites.

2414.0k1](/packages/inpsyde-multilingual-press)

PHPackages © 2026

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