fresh/transliteration

PHP library for transliteration.

Installs: 194

Dependents: 0

Stars: 11

Watchers: 2

Forks: 2

Open Issues: 2

Language: PHP

v1.1.0 2014-11-23 00:00 UTC

README

PHP library for transliteration.

Scrutinizer Quality Score Build Status CodeCov License Latest Stable Version Total Downloads Dependency Status SensioLabsInsight HHVM Gitter

Requirements

  • PHP 5.4 and later

Install via Composer

php composer.phar require fresh/transliteration='v1.1.0'

Available transliteration methods

From To Rules Ukrainian
Ukrainian English
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

Using

<?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);
    }
}

Some examples of Ukrainian-to-English transliteration

Ukrainian
Ukrainian text English
Transliterated text Володимир Volodymyr Богдан Bohdan Жанна Zhanna Наталія Nataliia Олексій Oleksii Уляна Uliana Юрій Yurii