PHPackages                             ez-php/i18n - 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. [Framework](/categories/framework)
4. /
5. ez-php/i18n

ActiveLibrary[Framework](/categories/framework)

ez-php/i18n
===========

Internationalisation module for the ez-php framework — file-based translations with dot-notation keys and locale fallback

1.11.1(1mo ago)03.6k↓90%2MITPHPPHP ^8.5CI passing

Since Mar 15Pushed 1mo agoCompare

[ Source](https://github.com/ez-php/i18n)[ Packagist](https://packagist.org/packages/ez-php/i18n)[ Docs](https://github.com/ez-php/i18n)[ RSS](/packages/ez-php-i18n/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (16)Versions (44)Used By (2)

ez-php/i18n
===========

[](#ez-phpi18n)

Internationalisation module for the [ez-php framework](https://github.com/ez-php/framework) — file-based translations with dot-notation keys and locale fallback.

[![CI](https://github.com/ez-php/i18n/actions/workflows/ci.yml/badge.svg)](https://github.com/ez-php/i18n/actions/workflows/ci.yml)

Requirements
------------

[](#requirements)

- PHP 8.5+
- ez-php/framework 0.\*

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

[](#installation)

```
composer require ez-php/i18n
```

Setup
-----

[](#setup)

Register the service provider:

```
$app->register(\EzPhp\I18n\TranslatorServiceProvider::class);
```

Add translation files under `lang/{locale}/`:

```
lang/
  en/
    messages.php   → ['welcome' => 'Welcome, :name!']
  de/
    messages.php   → ['welcome' => 'Willkommen, :name!']

```

Usage
-----

[](#usage)

```
$translator = $app->make(\EzPhp\I18n\Translator::class);

echo $translator->get('messages.welcome', ['name' => 'Alice']);
// Welcome, Alice!

$translator->setLocale('de');
echo $translator->get('messages.welcome', ['name' => 'Alice']);
// Willkommen, Alice!
```

Locale formatting
-----------------

[](#locale-formatting)

`LocaleFormatter` wraps PHP's `ext-intl` extension to format numbers, currencies, and dates in a locale-aware way:

```
use EzPhp\I18n\LocaleFormatter;

$fmt = new LocaleFormatter('de_DE');

echo $fmt->number(1234567.89);         // '1.234.567,89'
echo $fmt->currency(9.99, 'EUR');      // '9,99 €'
echo $fmt->date(new \DateTimeImmutable('2024-06-15')); // '15.06.2024'
echo $fmt->dateTime(new \DateTimeImmutable('2024-06-15 14:30:00')); // '15.06.2024, 14:30:00'
```

Requires PHP's `ext-intl` extension.

License
-------

[](#license)

MIT — [Andreas Uretschnig](mailto:andreas.uretschnig@gmail.com)

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance91

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

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

Every ~1 days

Total

43

Last Release

44d ago

Major Versions

0.9.3 → 1.0.02026-03-24

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/122030400?v=4)[AU9500](/maintainers/AU9500)[@AU9500](https://github.com/AU9500)

---

Top Contributors

[![AU9500](https://avatars.githubusercontent.com/u/122030400?v=4)](https://github.com/AU9500 "AU9500 (125 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (12 commits)")

---

Tags

phpframeworkinternationalizationi18ntranslationlocalisationez-php

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ez-php-i18n/health.svg)

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

###  Alternatives

[cakephp/i18n

CakePHP Internationalization library with support for messages translation and dates and numbers localization

28163.7k31](/packages/cakephp-i18n)[richarddobron/fbt

An Internationalization Framework for PHP.

1516.4k3](/packages/richarddobron-fbt)[richarddobron/laravel-fbt

A PHP Internationalization Framework for Laravel Application.

127.7k](/packages/richarddobron-laravel-fbt)

PHPackages © 2026

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