liopic/korean-romanizer
最新稳定版本:1.0
Composer 安装命令:
composer require liopic/korean-romanizer
包简介
Library to romanize Korean in UTF-8 format
README 文档
README
korean-romanizer
PHP 5.4+ library to romanize Korean in UTF-8 format.
Description
Uses the "Revised Romanization of Korean (국어의 로마자 표기법)" which is the official Korean language romanization system in South Korea proclaimed by Ministry of Culture, Sports and Tourism. Wikipedia page.
Notice that this is different from transliteration, which comes implemented in PHP's intl extension (Transliterator class). For example, "왕십리" subway stop is transliterated as "wangsibli" but romanized as "wangsimni" (which is closer to the Korean pronuntiation).
Usage
First add this library as requirement in your composer.json file. If you are not familiar with Composer, please read its documentation first.
{
"require": {
"liopic/korean-romanizer": "~1.0"
}
}
Then create a new KoreanRomanizer\Romanizer() instance with the Korean text in UTF-8 you want to romanize. For example:
require "vendor/autoload.php";
$example = new KoreanRomanizer\Romanizer("안녕 하세요");
echo $example->romanize(); //Displays "annyeong haseyo"
统计信息
- 总下载量: 156.24k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 19
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-01-20