1.0.5 • Published 3 years ago

serbian-latin-cyrillic-transliteration v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

This is simple Cyrillic to Latin transliteration plugin that actually works.

  • init library
import  SerbianLatinCyrillicTranslateration from 'serbian-latin-cyrillic-transliteration'

// instance library and setup options
const translator = new SerbianLatinCyrillicTranslateration({})

Options:

  • translatableElements: !string[] : add element that we want to translate.
 { 
   translatableElements:['.translate' ,'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'span', 'button', '.nav-link','.menuLink'] 
 }

defalt value are: ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'span', 'button']

How to switch alphabet:

/*
  param: string! , 
  options:  sr | sr_lat
  description: Pass   "sr" or "sr_lat" depending of which alphabet you want to use it
*/
translator.setLanguage('sr') 
1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago