PHPackages                             jbzoo/lang - 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. jbzoo/lang

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

jbzoo/lang
==========

Lightweight library for easy translation based on simple formats (php arrays, json, yml, ini)

1.0.1(10y ago)52.0k1MITPHPPHP &gt;=5.4

Since Feb 22Pushed 9y ago2 watchersCompare

[ Source](https://github.com/JBZoo/Lang)[ Packagist](https://packagist.org/packages/jbzoo/lang)[ RSS](/packages/jbzoo-lang/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (4)Used By (1)

JBZoo Lang [![Build Status](https://camo.githubusercontent.com/07c99b0972002946248487c63759085b3cf7d3782bbc68fd1a2984b6e46e22de/68747470733a2f2f7472617669732d63692e6f72672f4a425a6f6f2f4c616e672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/JBZoo/Lang) [![Coverage Status](https://camo.githubusercontent.com/065812a52cfda4d016c3d25f3e0f610de58822a7744d38b17cfce685d8356640/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4a425a6f6f2f4c616e672f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/JBZoo/Lang?branch=master)
=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#jbzoo-lang--------)

Lightweight library for easy translation based on simple formats (php arrays, json, yml, ini)

[![License](https://camo.githubusercontent.com/dadc0c31ccdb8cfa96de99f63e751a83b525af99ca00e21f6b52b7a2de152c52/68747470733a2f2f706f7365722e707567782e6f72672f4a425a6f6f2f4c616e672f6c6963656e7365)](https://packagist.org/packages/JBZoo/Lang) [![Latest Stable Version](https://camo.githubusercontent.com/b52cfc8ebf4850b534f6cb3ed08553415b40c41bf12df9bfe72a176744c09a2f/68747470733a2f2f706f7365722e707567782e6f72672f4a425a6f6f2f4c616e672f762f737461626c65)](https://packagist.org/packages/JBZoo/Lang) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/2c613c612b55b1ad6272ca18f579c0291c7311f378e232f5adbfc9a694e1cb8d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4a425a6f6f2f4c616e672f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/JBZoo/Lang/?branch=master)

Install
-------

[](#install)

```
composer require jbzoo/lang:"1.x-dev"  # Last version
composer require jbzoo/lang            # Stable version
```

Usage
-----

[](#usage)

```
require_once './vendor/autoload.php'; // composer autoload.php

// Get needed classes
use JBZoo\Lang\Lang;

// Create
$lang = new Lang('en');                             // Pass language code (only two chars!)

// Paths, modules, overload
$lang->load('./somepath/glob/');                    // ./somepath/glob/langs/en.php
$lang->load('./somepath/glob/', 'module_name');     // ./somepath/glob/langs/en.module_name.php
$lang->load('./somepath/module/', 'module_name');   // ./somepath/module/langs/en.module_name.php (overload previous)

// Other formats
$lang->load('./somepath/glob/', null, 'php');   // ./somepath/glob/langs/en.php
$lang->load('./somepath/glob/', null, 'json');  // ./somepath/glob/langs/en.json
$lang->load('./somepath/glob/', null, 'ini');   // ./somepath/glob/langs/en.ini
$lang->load('./somepath/glob/', null, 'yml');   // ./somepath/glob/langs/en.yml  (Symfony/Yaml)

// Traslate
$lang->translate('message_key');                // Only global
$lang->translate('module_name.message_key');    // Check module "module_name" and after that global path
```

Speed of one(!) call method `translate()`
-----------------------------------------

[](#speed-of-one-call-method-translate)

[PHP 5.6.x](https://travis-ci.org/JBZoo/Lang/jobs/110844247#L470) - Minimum time ~0.05ms

[PHP 7.0.x](https://travis-ci.org/JBZoo/Lang/jobs/110844248#L475) - Minimum time ~0.004ms

Unit tests and check code style
-------------------------------

[](#unit-tests-and-check-code-style)

```
make
make test-all
```

License
-------

[](#license)

MIT

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

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

Total

2

Last Release

3782d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/75e6de2785f6d099699f430ff58404af4fc0e83060d2953028c9664a54704a5f?d=identicon)[smetdenis](/maintainers/smetdenis)

---

Top Contributors

[![SmetDenis](https://avatars.githubusercontent.com/u/1118678?v=4)](https://github.com/SmetDenis "SmetDenis (14 commits)")

---

Tags

languagetranslationlocalelangjbzoolocalisation

### Embed Badge

![Health badge](/badges/jbzoo-lang/health.svg)

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

###  Alternatives

[tractorcow/silverstripe-fluent

Simple localisation for Silverstripe

90432.1k28](/packages/tractorcow-silverstripe-fluent)[codezero/laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

544656.8k4](/packages/codezero-laravel-localized-routes)[aplus/language

Aplus Framework Language Library

2371.7M15](/packages/aplus-language)[laravel-lang/locale-list

List of localizations available in Laravel Lang projects

105.6M15](/packages/laravel-lang-locale-list)[inpsyde/multilingual-press

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

2414.0k1](/packages/inpsyde-multilingual-press)[opgginc/codezero-laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

29119.1k1](/packages/opgginc-codezero-laravel-localized-routes)

PHPackages © 2026

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