PHP code example of vvvtool / zh-converter
1. Go to this page and download the library: Download vvvtool/zh-converter library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vvvtool / zh-converter example snippets
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注入攻击