Skip to content

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

License

Notifications You must be signed in to change notification settings

duguying/pinyin-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages