cyrillic-romanization
v1.1.7
Published
Convert Cyrillic characters to Latin characters (transliteration)
Downloads
106
Maintainers
Readme
Cyrillic Romanization
Convert Cyrillic characters to Latin characters (transliteration).
Default transliteration works according to ISO 9:1995.
However, ISO 9 is rarely used because it has unusual diacritical letters. Thus:
- Gaj's Latin alphabet transliteration is supported for Serbian, Macedonian, and Montenegrin alphabets;
- The -ia exception at the end of the word is supported for Bulgarian transliteration;
- The Kazakh transliteration follows the Decree of the President of the Republic of Kazakhstan dated October 26, 2017, No. 569, 2021 revision;
- MNS 5217:2012 standard is supported for the Mongolian Cyrillic alphabet;
- For Russian and Belarusian languages is used GOST 7.79-2000 (B);
- Additional ALA-LC romanization system for Russian;
- The Ukrainian Cyrillic alphabet is transliterated into Latin by the Ukrainian national system based on BGN/PCGN 2019;
- For Uzbek romanization is used Latin-based alphabet of the proposed version from 2023.
Be aware that the presented romanization rules are unsuitable for transliteration of geographic names.
Installation
npm install cyrillic-romanization
Usage
import cyrillicToLatin from 'cyrillic-romanization';
// ISO 9 by default
cyrillicToLatin('Ћирилица је изведена из грчког унцијала');
// => Ćirilica ǰe izvedena iz grčkog unciǰala
// Convert Serbian Cyrillic alphabet to Gaj's Latin alphabet
cyrillicToLatin('Овај веб сајт користи колачиће', 'srp');
// => Ovaj veb sajt koristi kolačiće
// Convert Russian into GOST 7.79-2000 System B
cyrillicToLatin(
'Широкая электрификация южных губерний даст мощный толчок подъёму сельского хозяйства',
'rus',
);
// => Shirokaya elektrifikaciya yuzhnyx gubernij dast moshhnyj tolchok podʺyomu selʹskogo xozyajstva
Language parameter values
iso9
— ISO 9, default (optional);alalc
— ALA-LC romanization for Russian;bel
— Belarusian language;bul
— Bulgarian language;cnr
— Montenegrin language;kaz
— Kazakh language;mkd
— Macedonian language;mon
— Mongolian language;rus
— Russian language;srp
— Serbian language;ukr
— Ukrainian language;uzb
— Uzbek language.