2017 © Pedro Peláez
 

library zhconverter

convert between Simplified Chinese(zh-Hans) and Traditional Chinese(zh-Hant)

image

rny/zhconverter

convert between Simplified Chinese(zh-Hans) and Traditional Chinese(zh-Hant)

  • Wednesday, November 2, 2016
  • by rny
  • Repository
  • 2 Watchers
  • 3 Stars
  • 3,577 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 25 % Grown

The README.md

ZhConverter

Build Status, (*1)

ZhConverter is a simple PHP library to convert between Simplified Chinese(zh-Hans) and Traditional Chinese(zh-Hant). ZhConverter is using WikiMedia ZhConverter.php as convertion table., (*2)

For those rquire better convertion quality, the C++ project OpenCC may be considered., (*3)

Highlights

  • One line code to do the convertion
  • Composer ready, PSR-4 compatible.
  • PHPUnit tested.

Install

Install ZhConverter using Composer., (*4)

$ composer require rny/zhconverter

Usage

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);

Testing

$ composer test

The Versions

02/11 2016

dev-master

9999999-dev

convert between Simplified Chinese(zh-Hans) and Traditional Chinese(zh-Hant)

  Sources   Download

MIT

The Development Requires

by Avatar rny

chinese

30/10 2016

1.0.0

1.0.0.0

convert between Simplified Chinese(zh-Hans) and Traditional Chinese(zh-Hant)

  Sources   Download

MIT

The Development Requires

by Avatar rny

chinese