Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 888 Bytes

README.md

File metadata and controls

44 lines (30 loc) · 888 Bytes

pinyin-php


Build Status travis

pinyin-php is a php extension which could translate Chinese character into Chinese PinYin.

build and install

linux

build the extension

phpize
configure
make
make test

configuration

add following into php.ini

pinyin.chars=/path/to/chars.csv
pinyin.words=/path/to/words.csv
pinyin.locale="en_GB.UTF-8"		[optional]

usage

<?php
echo pinyin(""),"\n";
echo pinyin("わたしわ阿飞, and my English name is Rex Lee. 网名是独孤影! ^_^。下面是一段多音分词歧义测试,这个人无伤无臭味。"),"\n";
?>

License

MIT License