PHPackages                             erneststaug/i18next-php - 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. erneststaug/i18next-php

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

erneststaug/i18next-php
=======================

A port of the i18next JS library for PHP

1.0.6(6y ago)012.4k1MITPHPPHP &gt;=7.3

Since Oct 4Pushed 3y agoCompare

[ Source](https://github.com/ErnestStaug/i18next-php)[ Packagist](https://packagist.org/packages/erneststaug/i18next-php)[ RSS](/packages/erneststaug-i18next-php/feed)WikiDiscussions master Synced today

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

i18next-php
===========

[](#i18next-php)

A port of [i18next](https://www.i18next.com/) in PHP. With a rest API. (coming soon \[tm\])

Code in this repository is largely based on the original code base in JavaScript, rewritten in PHP. This project focuses only on the newest version of i18next, disregarding compatibility with previous ones.

### Warning!

[](#warning)

This version is usable, but could contain bugs. If you find any issues please report them or create a PR.

### Features

[](#features)

- PSR3 logging support (psr/log is a hard requirement, but you're not required to actually use a logger)
- Extremely similar API to the JS version
- PHP-specific features like interfaces for modules
- PHP 7.3+
- Automatic language detection support

### Usage

[](#usage)

[View all examples here](examples)

- [Basic shared usage through the whole application](examples/example-shared.php)
- [Basic instancing of translation and separation from shared](examples/example-instance.php)
- [Basic plural handling](examples/example-plurals.php)
- [Basic language detection](examples/example-detect.php)

### Basic example

[](#basic-example)

```
// You can also use I18n globally via I18n::get()

$i18n = new I18n([
    'lng'           =>  'en',
    'resources'     =>  [
        'en'        =>  [
            'translation'       =>  [
                'key'           =>  'Value',
                'key_plural'    =>  'Value plural'
                'deeper'        =>  [
                    'key'           =>  'Deep value'
                ]
            ]
        ]
    ]
]);

$i18n->t('key'); // "Value"
$i18n->t('key', ['count' => 5]); // "Value plural"
$i18n->t('deeper.key'); // "Depp value"
```

### Composer

[](#composer)

Simply enter your project directory and run

`composer require pkly/i18next-php`

### Todo

[](#todo)

- Add event emitting

#### Packagist

[](#packagist)

Visit the page [here](https://packagist.org/packages/pkly/i18next-php)

#### Donate

[](#donate)

If you want feel free to buy me a coffee [by clicking here](https://paypal.me/pklytastic?locale.x=en_US)

###  Health Score

31

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 93.3% 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 ~22 days

Recently: every ~38 days

Total

8

Last Release

2354d ago

### Community

Maintainers

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

---

Top Contributors

[![pkly](https://avatars.githubusercontent.com/u/17160364?v=4)](https://github.com/pkly "pkly (70 commits)")[![ernst77](https://avatars.githubusercontent.com/u/17262977?v=4)](https://github.com/ernst77 "ernst77 (3 commits)")[![leohubert](https://avatars.githubusercontent.com/u/13404544?v=4)](https://github.com/leohubert "leohubert (1 commits)")[![Tomassito](https://avatars.githubusercontent.com/u/37559178?v=4)](https://github.com/Tomassito "Tomassito (1 commits)")

---

Tags

i18ntranslation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/erneststaug-i18next-php/health.svg)

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k39.6k](/packages/matomo-matomo)[jms/translation-bundle

Puts the Symfony Translation Component on steroids

42411.2M76](/packages/jms-translation-bundle)[api-platform/metadata

API Resource-oriented metadata attributes and factories

275.5M254](/packages/api-platform-metadata)[skillshare/formatphp

Internationalize PHP apps. This library provides an API to format dates, numbers, and strings, including pluralization and handling translations.

7933.0k](/packages/skillshare-formatphp)

PHPackages © 2026

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