PHPackages                             diamochang/i7h-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. diamochang/i7h-php

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

diamochang/i7h-php
==================

Implement RimoChan's own i18nglish in PHP without worrying about XSS attacks.

00PHP

Since May 5Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Diamochang/i7h-PHP)[ Packagist](https://packagist.org/packages/diamochang/i7h-php)[ RSS](/packages/diamochang-i7h-php/feed)WikiDiscussions m2n Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

i7h-PHP
=======

[](#i7h-php)

[简体中文](README_zh-hans.md) | [繁體中文](README_zh-hant.md)

[![PHP CI](https://github.com/Diamochang/i7h-PHP/actions/workflows/php.yml/badge.svg?branch=m2n)](https://github.com/Diamochang/i7h-PHP/actions/workflows/php.yml) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/d270eeba2e02210a552822aed862cf4c6e5946fcb1a5be62db097203a2415445/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4469616d6f6368616e672f6937682d5048502f6261646765732f7175616c6974792d73636f72652e706e673f623d6d326e)](https://scrutinizer-ci.com/g/Diamochang/i7h-PHP/?branch=m2n) [![PHP Version Support](https://camo.githubusercontent.com/f6b4c42d179afd267623146bed096191344e0e34e67d560d7819cb0cbd7d042c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6469616d6f6368616e672f6937682d706870)](https://camo.githubusercontent.com/f6b4c42d179afd267623146bed096191344e0e34e67d560d7819cb0cbd7d042c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6469616d6f6368616e672f6937682d706870) [![Packagist Stars](https://camo.githubusercontent.com/508836b1f2f606fff7edf593861e6936b031eb5605fd2dfb0563a3c7fa662a8b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f73746172732f6469616d6f6368616e672f6937682d7068702e737667)](https://packagist.org/packages/diamochang/i7h-php)

This project can implement [i18nglish](https://github.com/RimoChan/i7h), which was created by [RimoChan](https://github.com/RimoChan), in PHP without worrying about XSS attacks.

How it works
------------

[](#how-it-works)

The example text is taken from Richard M. Stallman's [*Free Software Song* lyrics](https://www.gnu.org/music/free-software-song.en.html).

Before:

```
When we have enough free software
At our call, hackers, at our call,
We'll kick out those dirty licenses
Ever more, hackers, ever more.

```

After:

```
W2n we h2e e4h f2e s6e
At o1r c2l, h5s, at o1r c2l,
We'll k2k o1t t3e d3y l6s
E2r m2e, h5s, e2r m2e.

```

(Note: I added the apostrophe in "We'll" myself, it was originally lost in the escaping process.)

How to use it
-------------

[](#how-to-use-it)

1. `git clone` the entire repository. If it's slow, try changing `hub` to `ee` in the Git URL to use the Gitee mirror. You can also use Composer: `composer require diamochang/i7h-php`.
2. Move `i7h.php` to your project. If you installed it with Composer, this step can be skipped.
3. Add the dependency to the code you want to use:

```
// Please refer to the actual location of i7h.php.
require_once "i7h.php";
```

4. Call it with the following code:

```
// Instantiate the i7h class
$i7h = new i7h();

// Call the i18n method to process the string and output the result.
echo $i7h->i18n('what you want to convert')
```

5. The job is done.

Known Issues
------------

[](#known-issues)

- English apostrophe may be lost in the escape process

Contributions
-------------

[](#contributions)

PRs are welcome, Issues are welcome.

License
-------

[](#license)

[MIT (Expat) License](https://github.com/Diamochang/i7h-PHP/blob/m2n/LICENSE)

###  Health Score

12

—

LowBetter than 0% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 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://avatars.githubusercontent.com/u/42176486?v=4)[Mike Wang](/maintainers/Diamochang)[@Diamochang](https://github.com/Diamochang)

---

Top Contributors

[![Diamochang](https://avatars.githubusercontent.com/u/42176486?v=4)](https://github.com/Diamochang "Diamochang (19 commits)")

### Embed Badge

![Health badge](/badges/diamochang-i7h-php/health.svg)

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

###  Alternatives

[smmoosavi/php-gettext

Wrapper for php-gettext by danilo segan. This library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

1927.0k1](/packages/smmoosavi-php-gettext)

PHPackages © 2026

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