PHP library for transliteration.
- PHP 5.4 and later
php composer.phar require fresh/transliteration='v1.1.0'
From | To | Rules |
---|---|---|
Ukrainian |
English |
Resolution of the Cabinet of Ministers of Ukraine №55 dated January 27, 2010
http://zakon1.rada.gov.ua/laws/show/55-2010-%D0%BF |
<?php
namespace Acme;
use Fresh\Transliteration\Transliterator;
use Fresh\Transliteration\UkrainianToEnglish;
class Foo
{
public function bar($text)
{
// You can use in this way
$transliterator = new Transliterator();
$transliteratedText = $transliterator->ukToEn($text);
// Or like this
$transliteratedText = UkrainianToEnglish::transliterate($ukrainianText);
}
}
Ukrainian text |
Transliterated text |
---|---|
Володимир | Volodymyr |
Богдан | Bohdan |
Жанна | Zhanna |
Наталія | Nataliia |
Олексій | Oleksii |
Уляна | Uliana |
Юрій | Yurii |