红联Linux门户
Linux帮助

PHP汉字转拼音工具overtrue/pinyin 3.0.1发布

发布时间:2016-05-19 09:27:05来源:红联作者:baihuo
3.0.1 是在 重构后的 3.0.0 的基础上新增了姓名转换功能:

翻译姓名

姓名的姓的读音有些与普通字不一样,比如 ‘单’ 常见的音为 dan,而作为姓的时候读 shan。

$pinyin->name('单某某'); // ['shan', 'mou', 'mou']

$pinyin->name('单某某', PINYIN_UNICODE); // ["shàn","mǒu","mǒu"]

3.0 新版用法请参阅:https://github.com/overtrue/pinyin

软件详情:https://github.com/overtrue/pinyin/releases

来自:开源中国社区
文章评论

共有 0 条评论