Skip to content

๐Ÿ‡บ๐Ÿ‡ฆ ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ”ก ๐Ÿ˜ PHP library for transliteration.

License

Notifications You must be signed in to change notification settings

fre5h/transliteration-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Transliteration

PHP library for transliteration. ๐Ÿ‡บ๐Ÿ‡ฆ ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ”ก ๐Ÿ˜

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

Requirements ๐Ÿง

  • PHP >= 8.1

Installation ๐ŸŒฑ

composer req fresh/transliteration='~4.0'

Available transliteration methods ๐ŸŽ

From To Rules
Ukrainian Latin Resolution of the Cabinet of Ministers of Ukraine โ„–55 dated January 27, 2010
https://zakon.rada.gov.ua/laws/show/55-2010-%D0%BF#Text

Using ๐Ÿ‘จโ€๐ŸŽ“

<?php

namespace Acme;

use Fresh\Transliteration\Transliterator;
use Fresh\Transliteration\UkrainianToLatin;

class Foo
{
    public function bar(string $text): void
    {
        // You can use in this way
        $transliterator = new Transliterator();
        $transliteratedText = $transliterator->ukrToLat($text);

        // Or like this
        $transliteratedText = UkrainianToLatin::transliterate($ukrainianText);
    }
}

Some examples of Ukrainian-to-Latin transliteration โ„น๏ธ

Ukrainian text Transliterated text
ะ’ะพะปะพะดะธะผะธั€ Volodymyr
ะ‘ะพะณะดะฐะฝ Bohdan
ะ–ะฐะฝะฝะฐ Zhanna
ะะฐั‚ะฐะปั–ั Nataliia
ะžะปะตะบัั–ะน Oleksii
ะฃะปัะฝะฐ Uliana
ะฎั€ั–ะน Yurii

Contributing ๐Ÿค

See CONTRIBUTING file.