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 2w ago

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 51% 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

4265d 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

[smarty-gettext/smarty-gettext

Gettext plugin enabling internationalization in Smarty Package files

752.5M8](/packages/smarty-gettext-smarty-gettext)[devaslanphp/auto-translate

Auto generate translation JSON files

6627.3k](/packages/devaslanphp-auto-translate)

PHPackages © 2026

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