fresh/transliteration

PHP library for transliteration.

Fund package maintenance!
fre5h

Installs: 42 428

Dependents: 1

Suggesters: 0

Security: 0

Stars: 32

Watchers: 3

Forks: 11

v4.0.0 2022-04-12 11:50 UTC

This package is auto-updated.

Last update: 2022-09-12 12:44:52 UTC


README

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.