serbian-latin-cyrillic-transliteration

    1.0.5 • Public • Published

    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') 

    Install

    npm i serbian-latin-cyrillic-transliteration

    DownloadsWeekly Downloads

    2

    Version

    1.0.5

    License

    ISC

    Unpacked Size

    4.85 kB

    Total Files

    4

    Last publish

    Collaborators

    • markonov1