paiv/uklatn

Ukrainian Cyrillic transliteration to Latin script

Fund package maintenance!
Patreon
Other

1.20.0 2024-12-25 16:01 UTC

This package is not auto-updated.

Last update: 2025-01-08 17:05:46 UTC


README

Ukrainian Cyrillic transliteration to Latin script.

Supported transliteration schemes:

Usage

use Paiv\UkrainianLatin;

$tr = new UkrainianLatin();

$tr->encode('Доброго вечора!');
$tr->decode('Paljanycja');

Set the transliteration scheme:

$tr->encode('Доброго вечора!', UkrainianLatin::DSTU_9112_B);
$tr->encode('Шевченко', UkrainianLatin::KMU_55);

Notes

Input is assumed to be in Ukrainian (Cyrillic or Latin script), and will be processed in full. If your data has mixed languages, do preprocessing to extract Ukrainian chunks.