PHPackages                             mordisacks/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. mordisacks/i18n

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

mordisacks/i18n
===============

Small but powerful locale library.

3.1.1(4y ago)54.8k1MITPHPPHP &gt;=5.6.0

Since Jun 12Pushed 4y agoCompare

[ Source](https://github.com/MordiSacks/I18n)[ Packagist](https://packagist.org/packages/mordisacks/i18n)[ RSS](/packages/mordisacks-i18n/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (10)Used By (1)

I18n
====

[](#i18n)

Small but powerful locale library.

Installation
============

[](#installation)

```
composer require mordisacks/i18n

```

Usage
=====

[](#usage)

Set locales directory

```
\MordiSacks\I18n\I18n::$dir = 'Lang';

```

Set current locale

```
\MordiSacks\I18n\I18n::$locale = 'he_IL';

```

Auto generate mode, If autoGenerate is set to true, Any missing domains and/or strings will be auto generated To use, simply state the following

```
\MordiSacks\I18n\I18n::$autoGenerate = true;

```

Translate!

```
echo \MordiSacks\I18n\I18n::translate('Hello World!', 'default');

```

If your text domain is "default", you can leave that parameter out

```
echo \MordiSacks\I18n\I18n::translate('Hello World!');

```

And via helper

```
echo __('Hello World!');

```

Variable injection! Added in version 2.0.0

```
$name = 'Mordi';
echo __('Hello :name', 'default', compact('name'))
// Outputs "Hello Mordi"

```

changelog
=========

[](#changelog)

3.0.0
-----

[](#300)

- Renamed production to autoGenerate

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

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 ~232 days

Recently: every ~463 days

Total

9

Last Release

1819d ago

Major Versions

1.1.0 → 2.0.02016-06-14

2.0.2 → 3.0.02017-12-16

### Community

Maintainers

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

---

Top Contributors

[![MordiSacks](https://avatars.githubusercontent.com/u/13218192?v=4)](https://github.com/MordiSacks "MordiSacks (1 commits)")

---

Tags

i18nlanguagelocalelangmulti-languagelocalisation

### Embed Badge

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

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

###  Alternatives

[aplus/language

Aplus Framework Language Library

2391.7M15](/packages/aplus-language)[tractorcow/silverstripe-fluent

Simple localisation for Silverstripe

91437.9k29](/packages/tractorcow-silverstripe-fluent)[vluzrmos/language-detector

Detect the language for your application using browser preferences, subdomains or route prefixes.

111573.0k3](/packages/vluzrmos-language-detector)[inpsyde/multilingual-press

Simply THE multisite-based free open source plugin for your multilingual websites.

2414.0k1](/packages/inpsyde-multilingual-press)[fisharebest/localization

A lightweight localization database and translation tools, with data from the CLDR, IANA, ISO, etc.

29109.6k3](/packages/fisharebest-localization)[sylius/locale

Locale handling for PHP applications.

10561.9k29](/packages/sylius-locale)

PHPackages © 2026

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