PHPackages                             zamphyr/zlo - 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. zamphyr/zlo

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

zamphyr/zlo
===========

Zamphyr Localizaton (ZLO) is a lightweight, easy to use translation and localization system for PHP.

28PHP

Since Nov 22Pushed 10y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

ZLO for PHP
===========

[](#zlo-for-php)

[!\[Gitter\](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/zamphyr/zlo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

Zamphyr Localizaton (ZLO) is a lightweight, easy to use, text-based &amp; naïf translation and localization system, made to facilitate inline replacable translation and localization, and naive in the process.

Features
--------

[](#features)

- ISO 639-2 &amp; ISO 639-3 *partly* compatible
- ISO 15924 compatible
- Inline replacement translation like gettext
- Plurals translation with natural number calculation
- Translation domains for modular translation (plugins, addons, etc...)
- Scan directory for available translation files
- Helpers in header for HTML encoding, language and writing direction

Requirements
------------

[](#requirements)

- PHP 5.3+

To-do
-----

[](#to-do)

- Demo for the masses!
- Faster (non-blocking) file reading and parsing
- ISO 6801 compatible date and time implementation
- Fix extension case sensitivity
- Check plural formulas
- Faster soluton for plural testing
- Some basic debug helpers
- Evaluator for directories to check for ZLO and create a translation file from it
- A better README
- Compatibility with ISO 639-1 (?)
- PSR compatibility
- DocBlocks documentation

Version
-------

[](#version)

- 0.0.4

Usage
=====

[](#usage)

Instantiating
-------------

[](#instantiating)

```
use Zamphyr\ZLO;

include 'libzlo.php';

$libzlo = new ZLO\libzlo("path/to/your/translation_files");

/**
 * Set ZL_LANG to current language you want to use.
 * You don't have to use $_GET it's just simple.
 */

$libzlo->ZL_LANG = isset($_GET["zl"]) ? $_GET['zl'] : NULL;
```

Translation
-----------

[](#translation)

Put the literal string for translation inside *zlo()* function, and let the magic happen.

```
echo $libzlo->zlo("Friday")
```

or if you're using it inside markup:

```

```

You can pass a number as a parameter and get the adequate non-singular form of the phrase for that number as a translation. This makes sense for non-English speakers, Arabic in particular.

```

```

Function calculates the form needed for number 13 in this case, and returns the translation in the proper form.

Meta stuff
----------

[](#meta-stuff)

If you want to check the instantiated directory for available trnaslation files use *zlo\_lang\_list()*. Returns an array with filenames.

```
$libzlo->zlo_lang_list()
```

Header function *zlo\_header()* will return an associative array with values from your translation header. You can pass *$code* of a translation file as a variable to check a file that's not being used at the moment.

```
$libzlo->zlo_header(string* $code)
```

You can get the stats for a translation file using *zlo\_stat()* It returns an array with useful info which includes:

- Number of sources
- Number of translations
- Number of flagged translations
- Translated per cent
- Fuzzy translatons per cent
- Translation file size in bytes

```
$libzlo->zlo_stat($libzlo->ZL_LANG);
```

Contact &amp; donations
-----------------------

[](#contact--donations)

You can get in touch with me via the e-mail noted inside the library or click the Gitter badge and we can chat about ZLO.

If you wish to port libZLO to other languages, frameworks or systems, let me know so I can help you out.

You can support me by sending some BitCoin crypto-money to

```
1KVmMLp5MHm1R3iM7Kprp1rUShinzLVtrV

```

**Dif-tor heh smusma!**

License
-------

[](#license)

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b63ba2f4af7936bc53792b7a6124fa08341b0f0faf59acb2e771e95a23f84a8?d=identicon)[marxo](/maintainers/marxo)

---

Top Contributors

[![marxo](https://avatars.githubusercontent.com/u/431616?v=4)](https://github.com/marxo "marxo (23 commits)")

### Embed Badge

![Health badge](/badges/zamphyr-zlo/health.svg)

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

###  Alternatives

[symfony/translation

Provides tools to internationalize your application

6.6k836.5M2.1k](/packages/symfony-translation)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M494](/packages/illuminate-translation)[lajax/yii2-translate-manager

Translation management extension for Yii 2

227578.8k13](/packages/lajax-yii2-translate-manager)[larswiegers/laravel-translations-checker

Make sure your laravel translations are checked and are included in all languages.

256423.2k2](/packages/larswiegers-laravel-translations-checker)

PHPackages © 2026

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