File: README.md

Recommend this page to a friend!
  Classes of Peter Kahl  >  Chinese Master  >  README.md  >  Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Chinese Master
Detect and convert text in Chinese
Author: By
Last change: Removed static
Date: 5 months ago
Size: 1,112 bytes
 

Contents

Class file image Download

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('???'); # ???


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