cyrillic-romanization
v1.2.1
Published
Convert Cyrillic characters to Latin characters (transliteration)
Maintainers
Readme
Cyrillic Romanization
Convert Cyrillic characters to Latin characters (transliteration).
Default transliteration works according to ISO 9:1995 regardless of the language.
However, ISO 9 is rarely used in practice because it has unusual diacritical letters. Thus:
- Gaj's Latin alphabet transliteration is supported for the Serbian, Macedonian, and Montenegrin alphabets;
- The Azerbaijani transliteration uses the contemporary form of the grapheme schwa instead of A-diaeresis (1992);
- The -ia exception at the end of a 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;
- The MNS 5217:2012 standard is supported for the Mongolian Cyrillic alphabet;
- For Russian and Belarusian, GOST 7.79-2000 (B) is used;
- An additional ALA-LC romanization system is supported for Russian;
- The Turkmen transliteration uses contemporary conventional letter symbols (1999);
- The Ukrainian Cyrillic alphabet is transliterated into Latin by the Ukrainian national system based on BGN/PCGN 2019;
- For Uzbek romanization, the Latin-based alphabet is used (proposed version from 2023).
Be aware that the presented romanization rules are unsuitable for the transliteration of geographic names.
Installation
npm install cyrillic-romanizationUsage
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 xozyajstvaLanguage parameter values
iso9— ISO 9, default (optional);alalc— ALA-LC romanization for Russian;aze— Azerbaijani language;bel— Belarusian language;bul— Bulgarian language;cnr— Montenegrin language;kaz— Kazakh language;mkd— Macedonian language;mon— Mongolian language;rus— Russian language;srp— Serbian language;tuk— Turkmen language;ukr— Ukrainian language;uzb— Uzbek language.
