Chinese Master: Detect and convert text in Chinese

Recommend this page to a friend!
  Info   Documentation   View files (4)   Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2020-03-30 (4 months ago) Not yet rated by the usersTotal: 52 All time: 9,821 This week: 248
Version License PHP version Categories
chinese-master 1.0.3Custom (specified...5Localization, PHP 5, Text processing
Description Author
This package is specific mainly for applications used in China China .

This class can detect and convert text in Chinese.

It can take a text string and detects if it is in simplified Chinese or traditional Chinese.

The class can also convert text between simplified and traditional Chinese encodings.

Innovation Award
PHP Programming Innovation award nominee
June 2017
Number 6
Chinese is a language that can be represented in either traditional and simplified formats.

This class can detect when a text string is represented in either format and convert the text between each of the format.

Manuel Lemos
Picture of Peter Kahl
  Performance   Level  
Name: Peter Kahl <contact>
Classes: 37 packages by
Country: United Kingdom
Age: ???
All time rank: 46522 in United Kingdom
Week rank: 48 2 in United Kingdom
Innovation award
Innovation award
Nominee: 23x

Winner: 2x

Details

Chinese Master

Downloads Download per Month License

Chinese traditional/simplified conversion; traditional/simplified detection.

Usage

use peterkahl\ChineseMaster\ChineseMaster;

$chm = new ChineseMaster;

/
 * Does string include (1 or more) characters of traditional Chinese script?
 *
 */
$isTraditional = ($chm->isTraditional('?')) ? true : false;  # false

$isTraditional = ($chm->isTraditional('?')) ? true : false;  # true

$isTraditional = ($chm->isTraditional('??')) ? true : false; # true

/
 * Convert text in traditional script to simplified.
 *
 */
echo $chm->trad2simp('???'); # ???

/
 * Convert text in simplified script to traditional.
 *
 */
echo $chm->simp2trad('???'); # ???

  Files  
File Role Description
src (1 file)
composer.json Data Auxiliary data
LICENSE Lic. License text
README.md Doc. Documentation

  Files  /  src  
File Role Description
   ChineseMaster.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:52
This week:0
All time:9,821
This week:248

For more information send a message to info at phpclasses dot org.