PHP code example of rny / zhconverter

1. Go to this page and download the library: Download rny/zhconverter 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/ */

    

rny / zhconverter example snippets


use Rny\ZhConverter\ZhConverter;

$text = ZhConverter::zh2hant($text);
$text = ZhConverter::zh2hans($text);
$text = ZhConverter::zh2TW($text);
$text = ZhConverter::zh2HK($text);
$text = ZhConverter::zh2CN($text);

$text = \Rny\ZhConverter\ZhConverter::zh2hant($text);
$text = \Rny\ZhConverter\ZhConverter::zh2hans($text);
$text = \Rny\ZhConverter\ZhConverter::zh2TW($text);
$text = \Rny\ZhConverter\ZhConverter::zh2HK($text);
$text = \Rny\ZhConverter\ZhConverter::zh2CN($text);