本文整理汇总了PHP中LanguageConverter::convertString方法的典型用法代码示例。如果您正苦于以下问题:PHP LanguageConverter::convertString方法的具体用法?PHP LanguageConverter::convertString怎么用?PHP LanguageConverter::convertString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LanguageConverter
的用法示例。
在下文中一共展示了LanguageConverter::convertString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: LanguageConverter
<?php
require_once 'classes/LanguageConverter.php';
$languageConverter = new LanguageConverter();
$str = "Gamarjoba samyaro!";
echo $languageConverter->convertString($str, 'geolat2utf8') . "\n";
$languageConverter->addCharMap('geolat2utf8MixTest', array('a' => 'A', 'b' => 'B', 'g' => 'G', 'd' => 'დ', 'e' => 'ე', 'v' => 'ვ', 'z' => 'ზ', 'T' => 'თ', 'i' => 'ი', 'k' => 'კ', 'l' => 'ლ', 'm' => 'მ', 'n' => 'ნ', 'o' => 'ო', 'p' => 'პ', 'J' => 'ჟ', 'r' => 'რ', 's' => 'ს', 't' => 'ტ', 'u' => 'უ', 'f' => 'ფ', 'q' => 'ქ', 'R' => 'ღ', 'y' => 'ყ', 'S' => 'შ', 'C' => 'ჩ', 'c' => 'ც', 'Z' => 'ძ', 'w' => 'წ', 'W' => 'ჭ', 'x' => 'ხ', 'j' => 'ჯ', 'h' => 'ჰ'));
echo $languageConverter->convertString($str, 'geolat2utf8MixTest', 'utf-8') . "\n";
echo "\n";
echo $languageConverter->convertStringByIndex($str, 'georgia', 'ascii', 'utf8') . "\n";
$languageConverter->addCharMapByIndex('georgia', 'ascii_1', array('A', 'B', 'G', 'D', 'E', 'V', 'Z', 'T', 'I', 'K', 'L', 'M', 'N', 'O', 'P', 'J', 'R', 'S', 'T', 'U', 'F', 'Q', 'R', 'Y', 'S', 'C', 'C', 'Z', 'W', 'W', 'X', 'J', 'H'));
echo "\n";
echo $languageConverter->convertStringByIndex('ÂÀÌÀÒãÏÁÀ ÓÀÌÚÀÒÏ', 'georgia', 'ascii_1', 'stlat') . "\n";