PHPackages                             vvvtool/zh-converter - 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. vvvtool/zh-converter

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

vvvtool/zh-converter
====================

PHP 中文繁简转换工具，支持简体中文、繁体中文、台湾繁体、香港繁体之间的互相转换，提供简单高效的中文字符转换解决方案。A PHP package for converting between simplified and traditional Chinese characters.

1.1.0(11mo ago)2219↓100%MITPHPPHP ^7.1 || &gt;=8.0

Since May 14Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/VVVTool/zh-converter)[ Packagist](https://packagist.org/packages/vvvtool/zh-converter)[ RSS](/packages/vvvtool-zh-converter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

zh-converter
============

[](#zh-converter)

[![Latest Stable Version](https://camo.githubusercontent.com/7250f8d2660eba5c4b10570824a6e548cc413fe0b2e05d3c015acae9c6fedc39/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f767676746f6f6c2f7a682d636f6e7665727465722e737667)](https://packagist.org/packages/vvvtool/zh-converter)[![Total Downloads](https://camo.githubusercontent.com/71a3e89251aeefff2e37cc599eb8aa5a7250ac44c59fc780a20419135ba7a458/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f767676746f6f6c2f7a682d636f6e7665727465722e737667)](https://packagist.org/packages/vvvtool/zh-converter)[![License](https://camo.githubusercontent.com/9708d5f645f8e3a6d8a5a8f515294c6be9db35aea2dd9bd323fc5302163da888/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f767676746f6f6c2f7a682d636f6e7665727465722e737667)](https://packagist.org/packages/vvvtool/zh-converter)

简介
--

[](#简介)

`zh-converter` 是一个功能强大的 PHP 中文转换工具，支持简体中文、繁体中文、台湾繁体、香港繁体之间的互相转换。主要特点：

- 支持简体中文与繁体中文的互相转换
- 支持简体中文转换为香港繁体中文
- 支持简体中文转换为台湾繁体中文
- 支持香港繁体、台湾繁体转换为简体中文
- 准确处理地区差异用词（例如：计算机/電腦/電子計算機）

安装
--

[](#安装)

通过 Composer 安装：

```
composer require vvvtool/zh-converter
```

使用方法
----

[](#使用方法)

以下是一些如何使用 `ZhConverter` 的示例：

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

use VVVTool\ZhConverter\ZhConverter;

// 简体转繁体
$traditional = ZhConverter::s2t('简体转繁体');  // 簡體轉繁體

// 繁体转简体
$simplified = ZhConverter::t2s('繁體轉簡體');   // 繁体转简体

// 简体转香港繁体
$hkTraditional = ZhConverter::s2hk('计算机');   // 計算機

// 简体转台湾繁体
$twTraditional = ZhConverter::s2tw('SQL注入攻击');     // SQL隱碼攻擊

// 香港繁体转简体
$simplified = ZhConverter::hk2s('計算機');        // 计算机

// 台湾繁体转简体
$simplified = ZhConverter::tw2s('SQL隱碼攻擊');        // SQL注入攻击
```

单元测试
----

[](#单元测试)

要运行本项目的单元测试，请确保您已安装开发依赖：

```
composer install --dev
```

然后，运行单元测试：

```
./vendor/bin/phpunit
```

问题反馈
----

[](#问题反馈)

如果您遇到任何错误或有功能建议，请通过 [GitHub Issues 页面](https://github.com/vvvtool/zh-converter/issues) 进行报告。

报告问题时，请包括以下信息：

- 清晰的问题描述。
- 问题重现步骤。
- 您正在使用的 `zh-converter` 版本。
- 您的 PHP 版本。
- 任何相关的错误信息或截图。

参与贡献
----

[](#参与贡献)

欢迎为项目贡献代码！请 fork 项目并提交 pull request。

开源协议
----

[](#开源协议)

本项目遵循 MIT License 许可协议。详情请查看 LICENSE 文件。

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance53

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

Total

2

Last Release

355d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/873d1bb13c817d54f22236e65d5bdc7fffb45114b0f34753883115b753ed376c?d=identicon)[VVVTools](/maintainers/VVVTools)

---

Top Contributors

[![VVVTool](https://avatars.githubusercontent.com/u/210949404?v=4)](https://github.com/VVVTool "VVVTool (11 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vvvtool-zh-converter/health.svg)

```
[![Health](https://phpackages.com/badges/vvvtool-zh-converter/health.svg)](https://phpackages.com/packages/vvvtool-zh-converter)
```

###  Alternatives

[robicch/jquery-gantt

Twproject Gantt editor is a free online tool for creating and sharing Gantts

2.3k157.7k](/packages/robicch-jquery-gantt)[brickrouge/brickrouge

A toolkit to create HTML elements

301.8k6](/packages/brickrouge-brickrouge)

PHPackages © 2026

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