<?php

$t = transliterator_create("Latin; Title");
$s = "Κοντογιαννάτος, Βασίλης";
echo $t->transliterate($s), "\n";
echo transliterator_transliterate($t, $s), "\n";
echo $t->transliterate($s, 3), "\n";
echo $t->transliterate($s, 3, 4), "\n";
echo "Done.\n";
Ejemplo n.º 2
0
<?php

ini_set("intl.error_level", E_WARNING);
$t = Transliterator::create("any-latin");
echo $t->id, "\n";
$t = transliterator_create("any-latin");
echo $t->id, "\n";
echo "Done.\n";
Ejemplo n.º 3
0
<?php

ini_set("intl.use_exceptions", true);
$t = transliterator_create('any-hex');
try {
    var_dump($t->transliterate('a', 3));
} catch (IntlException $intlE) {
    var_dump($intlE->getMessage());
}
ini_set("intl.use_exceptions", false);
ini_set("intl.error_level", E_NOTICE);
var_dump($t->transliterate('a', 3));