Location: PHPKode > scripts > Translit > translit/test.php
<?
include("translit.php");
$str = "Ýòî íåáîëüøîé ïðèìåð èñïîëüçîâàíèÿ ôóíêöèè òðàíñëèòåðàöèè...
Ýòà ñòðîêà â êîäèðîâêå cp-1251, à ðåçóëüòàò ìû ïîëó÷èì â utf-8.";
echo "Before:<pre>$str</pre><hr />";

$t = new Translit();
$trans = $t->Transliterate($str, "cp1251", "utf-8");
echo "After:<pre>$trans</pre>";
?>
Return current item: Translit