PHPackages                             paquettg/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. [Localization &amp; i18n](/categories/localization)
4. /
5. paquettg/i18n

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

paquettg/i18n
=============

A stand alone i18n php library.

1.0.1(7y ago)6337MITPHPPHP &gt;=7.1

Since Jun 26Pushed 7y ago2 watchersCompare

[ Source](https://github.com/paquettg/i18n)[ Packagist](https://packagist.org/packages/paquettg/i18n)[ Docs](https://github.com/paquettg/i18n)[ RSS](/packages/paquettg-i18n/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

i18n
====

[](#i18n)

Version 1.0.1

[![Build Status](https://camo.githubusercontent.com/d289a47170fc95ba19d8f40bc0206c0c1a10f27b7351235e2720c3cb1e17324e/68747470733a2f2f7472617669732d63692e6f72672f70617175657474672f6931386e2e737667)](https://travis-ci.org/paquettg/i18n)[![Coverage Status](https://camo.githubusercontent.com/dfa64c33e7e33a3db21bc1eabb4364027f3ccae23e8d536901cc034a0b3e78fc/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f70617175657474672f6931386e2f62616467652e706e67)](https://coveralls.io/r/paquettg/i18n)

I18n is a php framework agnostic package to handle I18n functionality (such an original name). The goal is to have the ability to implement multiple languages into a website with out needing to depend on a framework.

Install
-------

[](#install)

This package can be found on [packagist](https://packagist.org/packages/paquettg/i18n) and is best loaded using [composer](http://getcomposer.org/). We support PHP 7.1, 7.2, and 7.3.

Simple Example
--------------

[](#simple-example)

You can find many examples of how to use the package and any of its parts (which you will most likely never touch) in the tests directory. The tests are done using PHPUnit and are very small, a few lines each, and are a great place to start. Given that, I'll still be showing examples of how the package is intended to work. The following example is a very simplistic usage of the package, good place to start.

```
use I18n\I18n;

$i18n = new I18n;
$i18n->set([
	'foo' => 'bar',
	'baz' => [
		'rawr' => 'meow?',
	],
], 'en_CA');
$i18n->load('en_CA');

echo $i18n->get('baz.rawr'); // will output 'meow?'
```

You may also set a directory to look at to load the given locales.

```
use I18n\I18n;

$i18n = new I18n;
$i18n->load($pathToLocaleDirectory);
$i18n->load($locale);
```

Using static facade
-------------------

[](#using-static-facade)

We also support a static facade so you don't need to carry around the I18n object to every part of your application.

```
use I18n\Facade\StaticI18n;

StaticI18n::mount();
I18n::set([
	'foo' => 'bar',
	'baz' => [
		'rawr' => 'meow?',
	],
], 'en_CA');
I18n::load('en_CA');
echo I18n::get('baz.rawr');
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

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

Every ~819 days

Total

3

Last Release

2701d ago

Major Versions

0.1.0 → 1.0.02018-12-20

PHP version history (2 changes)0.1.0PHP &gt;=5.4

1.0.1PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/adbf01676bb34c0c255dfa9ab373ccf47e2e6aae9389a4b8975576bce67fbbe7?d=identicon)[paquettg](/maintainers/paquettg)

---

Top Contributors

[![paquettg](https://avatars.githubusercontent.com/u/2430962?v=4)](https://github.com/paquettg "paquettg (18 commits)")

---

Tags

internationalizationi18n

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[symfony/intl

Provides access to the localization data of the ICU library

2.6k199.8M1.1k](/packages/symfony-intl)[gettext/languages

gettext languages with plural rules

7530.3M11](/packages/gettext-languages)[aplus/language

Aplus Framework Language Library

2351.7M15](/packages/aplus-language)[punic/punic

PHP-Unicode CLDR

1542.9M29](/packages/punic-punic)[aura/intl

The Aura Intl package provides internationalization tools, specifically message translation.

898.3M4](/packages/aura-intl)[tractorcow/silverstripe-fluent

Simple localisation for Silverstripe

92421.6k26](/packages/tractorcow-silverstripe-fluent)

PHPackages © 2026

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