PHPackages                             phellow/intl - 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. phellow/intl

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

phellow/intl
============

Helps to work with locales and translations

1.0.0(11y ago)0501MITPHP

Since Dec 13Pushed 11y ago1 watchersCompare

[ Source](https://github.com/phellow/intl)[ Packagist](https://packagist.org/packages/phellow/intl)[ RSS](/packages/phellow-intl/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (1)

Install via Composer
--------------------

[](#install-via-composer)

Add the following dependency to your project's *composer.json* file:

```
{
    "require": {
        "phellow/intl": "1.*"
    }
}
```

Usage
-----

[](#usage)

Create an object of *Phellow\\Intl\\IntlService*. With this object, you can:

- store the current used locale of your application.
- translate texts (plurals are also supported).
- format a DateTime object based on the current locale.

```
$intl = new IntlService('en_US');
$intl->setAvailableLocales(['en_US', 'de_DE']);

// get current locale
$locale = $intl->getLocale();

// translate texts
$translator = new ArrayTranslator('path/to/translation-files');
$intl->setTranslator($translator);

$text = $intl->_('translate this');
$text = $intl->_n('one', 'more', 2);
```

To see all the possibilities, you can check out the Unit Tests under *tests/*.

License
-------

[](#license)

The MIT license.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

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

4220d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/864455?v=4)[Christian Blos](/maintainers/christianblos)[@christianblos](https://github.com/christianblos)

---

Top Contributors

[![christianblos](https://avatars.githubusercontent.com/u/864455?v=4)](https://github.com/christianblos "christianblos (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phellow-intl/health.svg)

```
[![Health](https://phpackages.com/badges/phellow-intl/health.svg)](https://phpackages.com/packages/phellow-intl)
```

###  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)
