fresh/transliteration

PHP library for transliteration.

Fund package maintenance!
fre5h

Installs: 27 541

Dependents: 1

Suggesters: 0

Security: 0

Stars: 27

Watchers: 3

Forks: 11

v2.1.3 2021-04-25 10:23 UTC

This package is auto-updated.

Last update: 2021-08-25 10:57:48 UTC


README

PHP library for transliteration. 🇺🇦 🇬🇧 🇷🇺 🔡 🐘

Scrutinizer Quality Score Build Status CodeCov License Latest Stable Version Total Downloads StyleCI Gitter

Requirements 🧐

  • PHP 7.2 and later

Installation 🌱

composer req fresh/transliteration='~2.1'

Available transliteration methods 🎁

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
Russian English custom

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 text Transliterated text
Володимир Volodymyr
Богдан Bohdan
Жанна Zhanna
Наталія Nataliia
Олексій Oleksii
Уляна Uliana
Юрій Yurii

Contributing 🤝

See CONTRIBUTING file.