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

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

alpakaio/i18next-php
====================

A port of the i18next JS library for PHP

v1.0.6(4y ago)58.4k↓43.8%4[6 issues](https://github.com/alpakaio/i18next-php/issues)[1 PRs](https://github.com/alpakaio/i18next-php/pulls)MITPHPPHP &gt;=7.3

Since Nov 18Pushed 2y agoCompare

[ Source](https://github.com/alpakaio/i18next-php)[ Packagist](https://packagist.org/packages/alpakaio/i18next-php)[ RSS](/packages/alpakaio-i18next-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)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 alpakaio/i18next-php`

### Todo

[](#todo)

- Add event emitting

#### Packagist

[](#packagist)

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

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

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

1642d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/61f43b7b9df2ca686046c7803fae0e2cad67d37e2984869f37ed2ba352e9058d?d=identicon)[deavial](/maintainers/deavial)

---

Top Contributors

[![deavial](https://avatars.githubusercontent.com/u/763805?v=4)](https://github.com/deavial "deavial (3 commits)")[![riddle418](https://avatars.githubusercontent.com/u/80154154?v=4)](https://github.com/riddle418 "riddle418 (1 commits)")

---

Tags

i18ntranslation

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[jenssegers/date

A date library to help you work with dates in different languages

1.8k11.2M80](/packages/jenssegers-date)[gettext/gettext

PHP gettext manager

70130.2M102](/packages/gettext-gettext)[jms/translation-bundle

Puts the Symfony Translation Component on steroids

42510.8M63](/packages/jms-translation-bundle)[fightbulc/moment

Parse, validate, manipulate, and display dates in PHP w/ i18n support. Inspired by moment.js

9693.2M10](/packages/fightbulc-moment)[lexik/translation-bundle

This bundle allows to import translation files content into the database and provide a GUI to edit translations.

4362.7M19](/packages/lexik-translation-bundle)[sonata-project/translation-bundle

SonataTranslationBundle

771.7M10](/packages/sonata-project-translation-bundle)

PHPackages © 2026

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