PHPackages                             azettl/php-nano-translation - 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. azettl/php-nano-translation

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

azettl/php-nano-translation
===========================

The php-nano-translation class gives you the correct translation from the requested JSON file.

0.0.1(8y ago)09MITPHPPHP ^7.1

Since Aug 2Pushed 8y ago1 watchersCompare

[ Source](https://github.com/azettl/php-nano-translation)[ Packagist](https://packagist.org/packages/azettl/php-nano-translation)[ RSS](/packages/azettl-php-nano-translation/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

php-nano-translation - Translation Engine
=========================================

[](#php-nano-translation---translation-engine)

[![Codacy Badge](https://camo.githubusercontent.com/c681d43bf046e7aa382d1323c990de19f770cb36ecfc55eebd78a1397ebeab5a/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3935666534343731333833333433306262373531663830373438386330353133)](https://www.codacy.com/app/azettl/php-nano-translation?utm_source=github.com&utm_medium=referral&utm_content=azettl/php-nano-translation&utm_campaign=badger)[![Codacy Badge](https://camo.githubusercontent.com/6e67b311e28bc57e0251082a39bbd5bbf4a3b1d89f17b679da3ec2f3128b567f/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f436f7665726167652f3935666534343731333833333433306262373531663830373438386330353133)](https://www.codacy.com/app/azettl/php-nano-translation?utm_source=github.com&utm_medium=referral&utm_content=azettl/php-nano-translation&utm_campaign=Badge_Coverage)

The php-nano-translation class gives you the correct translation from the requested JSON file.

Installation
------------

[](#installation)

```
composer require azettl/php-nano-translation
```

Usage
-----

[](#usage)

```
require __DIR__ . '/vendor/autoload.php';

$oTranslation = new com\azettl\nano\translation();
$oTranslation->setBasePath('vendor/azettl/php-nano-translation/tests/translations/');
$oTranslation->setFileNamePattern('test.%s.json');

echo $oTranslation->translate('MY_KEY_WITH_VARS', 'en', ['variable' => 'test']);
```

Translation Key Value: "My {variable} Value" Returns: "My test Value"

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

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

3203d ago

### Community

Maintainers

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

---

Top Contributors

[![azettl](https://avatars.githubusercontent.com/u/644570?v=4)](https://github.com/azettl "azettl (18 commits)")[![codacy-badger](https://avatars.githubusercontent.com/u/23704769?v=4)](https://github.com/codacy-badger "codacy-badger (1 commits)")

---

Tags

translationengine

### Embed Badge

![Health badge](/badges/azettl-php-nano-translation/health.svg)

```
[![Health](https://phpackages.com/badges/azettl-php-nano-translation/health.svg)](https://phpackages.com/packages/azettl-php-nano-translation)
```

###  Alternatives

[gettext/gettext

PHP gettext manager

70530.2M101](/packages/gettext-gettext)[inpsyde/multilingual-press

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

2414.0k1](/packages/inpsyde-multilingual-press)[wcm/wcm-lang-switch

Adds a button to the admin toolbar. This buttons allows users to seamlessly switch between available languages..

212.0k](/packages/wcm-wcm-lang-switch)

PHPackages © 2026

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