PHPackages                             steelywing/chinese - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. steelywing/chinese

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

steelywing/chinese
==================

中文繁簡轉換 Convert Traditional and Simplified Chinese

0.5.3(6y ago)3875.8k↓14.2%112MITPHP

Since Sep 22Pushed 6y ago1 watchersCompare

[ Source](https://github.com/steelywing/PHP-Chinese)[ Packagist](https://packagist.org/packages/steelywing/chinese)[ RSS](/packages/steelywing-chinese/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (11)Used By (2)

Chinese Conversion
==================

[](#chinese-conversion)

PHP Chinese Conversion, Simple, Lightweight (v0.2 with WikiMedia Library &lt; 400KB)

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

[](#installation)

Use [Composer](https://getcomposer.org)
---------------------------------------

[](#use-composer)

```
composer require steelywing/chinese

```

Manually install
----------------

[](#manually-install)

- Clone this repo

    ```
    git clone https://github.com/steelywing/PHP-Chinese.git

    ```
- Generate `autoload.php`, run on `PHP-Chinese` folder

    ```
    composer dump-autoload

    ```

Feature
=======

[](#feature)

- Use WikiMedia or OpenCC library
- Lightweight
- 使用最長匹配規則

Demo
====

[](#demo)

For more usage, see [demo.php](demo/demo.php)

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

use SteelyWing\Chinese\Chinese;

$chinese = new Chinese();

echo $chinese->to(Chinese::ZH_HANS, '轉成簡體中文'); // 转成简体中文
echo $chinese->to(Chinese::ZH_HANT, '转成繁体中文'); // 轉成繁體中文
```

Switch library
==============

[](#switch-library)

Switch to OpenCC, run the following command in `dict` folder

```
git clone https://github.com/BYVoid/OpenCC.git
php import_opencc.php
```

Switch to WikiMedia, run the following command in `dict` folder

```
php import_wikimedia.php
```

License
=======

[](#license)

MIT

[WikiMedia License](https://github.com/wikimedia/mediawiki/blob/master/COPYING)

[OpenCC License](https://github.com/BYVoid/OpenCC/blob/master/LICENSE)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity59

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.

###  Release Activity

Cadence

Every ~69 days

Recently: every ~1 days

Total

10

Last Release

2535d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a9ad22318911e5698f29a1a59ab2758bf481fc7c999e6f8f9cfc1361ddeb9390?d=identicon)[steely.wing](/maintainers/steely.wing)

---

Top Contributors

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

---

Tags

chinesechinese-simplifiedchinese-traditionalchinese-translationphp

### Embed Badge

![Health badge](/badges/steelywing-chinese/health.svg)

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

PHPackages © 2026

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