dreamsdrive / zh-conv
Traditional Chinese and Simplified Chinese Conversion base on wikimedia zhconv table
Installs: 854
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/dreamsdrive/zh-conv
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-10-21 08:53:35 UTC
README
Traditional Chinese and Simplified Chinese Conversion base on wikimedia zhconv table
Installation
Via composer
Add the package to your composer.json file:
{
"require": {
"dreamsdrive/zh-conv": "*"
}
}
Run composer update.
Usage
The following example describes basic usage.
<?php
require_once('vendor/autoload.php');
use DreamsDrive\ZhConv;
echo '<pre>';
echo ZhConv::get('HK','CN','「你們國家也有黑人嗎?」 布殊 ——2002年,巴西總統訪問美國。');
echo ZhConv::get('TW','CN','「你們國家也有黑人嗎?」 布希 ——2002年,巴西總統訪問美國。');
echo ZhConv::get('CN','HK','“你们国家也有黑人吗?” 布什 ——2002年,巴西总统访问美国。');
echo ZhConv::get('CN','TW','“你们国家也有黑人吗?” 布什 ——2002年,巴西总统访问美国。');
echo '</pre>';
?>