Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

translit-rus-eng

Macseam802ISC2.0.0

Transliteration script for rus-eng transitions and vice versa

translit, rus, eng, convert, language, cyrillic, latin

readme

TranslitRusEng

Transliteration script for rus-eng and eng-rus transitions.

Based on ISO 9/ГОСТ 7.79 standard (with a few improvements).

  • No dependencies, only 4Kb
  • Transliterate from Russian to English and vice versa

Usage:

  • import translitRusEng from 'translit-rus-eng';

Version 1.x.x:

  • translitRusEng (string, options)

string: string/array/object values to transliterate (Russian or English)

options: object, can include booleans 'engToRus', 'slug' (to make url-friendly slug-like strings) or 'lowerCase' (to force transliteration into lowercase)


Version 1.x.x examples:

translitRusEng ("Kol`skij poluostrov", { engToRus: true }):

"Кольский полуостров"

translitRusEng ("Широкая электрификация южных губерний", { slug: true }):

"shirokaya_elektrifikacziya_yuzhnyh_gubernij"

translitRusEng ("Скушай ещё этих мягких булочек", { lowerCase: true }):

"skushaj eshhyo e`tih myagkih bulochek"


Version 2.x.x:

  • translitRusEng (options)

string: string value to transliterate (Russian or English, auto-selection of transliteration language)

options: object, can include string 'target' for forced target language choice (possible values are "rus" and "eng") and boolean 'slugify' (to make url-friendly slug-like strings)


Version 2.x.x examples:

translitRusEng ("Kol`skij poluostrov"):

"Кольский полуостров"

translitRusEng ("Широкая электрификация южных губерний", { slugify: true }):

"shirokaya_elektrifikacziya_yuzhnyh_gubernij"

translitRusEng ("Широкая электрификация южных губерний компанией Samsung", { target: 'eng' }):

"Shirokaya e`lektrifikacziya yuzhnyh gubernij kompaniej Samsung"

translitRusEng ("Скушай ещё этих мягких булочек"):

"Skushaj eshhyo e`tih myagkih bulochek"