Skip to content

This is a tool that allows to generate all common used transliterations.

License

Notifications You must be signed in to change notification settings

otanim/transliteration-with-spice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a tool that allows to generate all common used transliterations.

Supported transliterations

  • Armenian -> Cyrillic (Russian, ru)
  • Armenian -> ASCII (English, en)
  • Russian -> ASCII (English, en)

Install

$ npm install transliteration-with-spice --save

Usage

const transliterate = require('transliteration-with-spice');
// The function takes 2 arguments,
// 1st argument is the text that needs to be transliterated,
// 2nd argument is ISO-639-1 language code to which the text needs to be transliterated,
// 2nd argument is an optional, the default value is "en".

const translitsHY2EN = transliterate('բարե՛ւ աշխարհ');
console.log(translitsHY2EN.join(', '));
// barev ashkharh, barev askharh, barev ashxarh, barev asxarh

const translitsHY2RU = transliterate("բարե՛ւ աշխարհ", 'ru');
console.log(translitsHY2RU.join(', '));
// барев ашхар, барев ашхарх

const translitsRU2EN = transliterate('привет мир!');
console.log(translitsRU2EN.join(', '));
// privet mir!, privyot mir!, privot mir!

About

This is a tool that allows to generate all common used transliterations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published