PramukhLib: Javascript library for Indian script is updated


From past few months I was working on updating PramukhLib: Javascript library for Indian Script. This library can provide your Website a power to write in 9 different Indian scripts (not languages). I have done major changes in the library including functional changes as well as character mapping changes.

I have created many tools that depend on PramukhLib library. All of those tools were also updated to use new script. Version number for each tool is increased to match to that of PramukhLib. Here is a list of all tools those were updated

  • PramukhLib: Javascript Library
  • IndicIME TinyMCE plugin
  • IndicIME FCKEditor plugin
  • IndicIME WordPress plugin
  • Pramukh Type Pad: WYSIWYG HTML editor
  • Pramukh Type Pad: Firefox Extension (Add-on)

Here is a list of changes that I made in PramukhLib and hence in all above mentioned tool

Functional Changes

  • ConvertAllToIndicIME is removed and ConvertPageToIndicIME is added which does the same function
  • ConvertPageToDefault and ConvertToDetault functions were added to remove IndicIME functionality from elements
  • Memory optimization when you want to write in your language on whole Webpage.

Script Changes

  • Added “H” to perform same action as “:” for all scripts
  • Added Zero Width Joiner and Zero Width Non Joiner character supports for all scripts
  • Punctuation characters removed from mapping and replaced with less used symbols
  • Symbols with special meaning for Indic script can be printed by suffixing “~”.
  • Added “S” to perform same action as “sh”
  • For all scripts help image is updated
  • For all scripts, typing “a^i” gives separate characters
  • For all scripts, “ou” is now equivalent to “au”
  • For all scripts, R is changed to “Ru” and RR is changed to “RU”
  • For applicable scripts Q and QQ is changed to “Lu~” and “LU~”
  • For applicable scripts, avagrah is now represented with “&”
  • For applicable scripts, chandrabindu is now represented with “M~”
  • Example words are added at the bottom of the help image.
  • Bengali: Added Khand t letter, Changed letter for r, rr and v/w
  • Misspelled “devnagari” is changed to “devanagari”
  • Gurmukhi Script: Tippi and Addak will be printed by M~ and N~ instead of ~ and @.
  • Kannada Script: Swapped characters for e<->E, o<->O. Halant will be retained after consonant. rr character is changed to rx to correctly display rra.
  • Malayalam Script: Swapped characters for e<->E, o<->O. Halant will be retained after consonant. Added chillu character support for N, n, r, l and L
  • Oriya Script: y and Y gives different letters
  • Tamil Script: Swapped characters for e<->E, o<->O. Halant will be retained after consonant. Added kSh letter, 0(zero), f.
  • Telugu Script: Swapped characters for e<->E, o<->O. Halant will be retained after consonant.

About Vishal Monpara

Vishal Monpara is a full stack Solution Developer/Architect with 13 years of experience primarily using Microsoft stack. He is currently working in Retail industry and moving 1's and 0's from geographically dispersed hard disks to geographically dispersed user leveraging geographically dispersed team members.

24 thoughts on “PramukhLib: Javascript library for Indian script is updated

  1. Vishal Post author

    On the page load use pramukhIME.setLanguage() function to set it. Please refer to the Javascript documentation for more details.


  2. Nizam

    Got it 🙂
    Vishal,
    I did it. My another question is.. I want to set a particular language on load itself instead of English. How to do it?


  3. Vishal Post author

    Nizam,

    PramukhIME TinyMCE plugin is completely different than PramukhIME Javascript Library. If you are creating TinyMCE from textarea, you can use the plugin but it will not work textbox. For textbox, you need to use PramukhIME javascript library and enable it. Both can work on one page. Your configuration looks good. Please checkout Javascript console to see if you are getting any error.


  4. Nizam

    @Vishal
    Vishal,

    I’ve tried with older version. It was working for both textbox & textarea. My main issue is with TinyMCE Textarea & Textbox. When I enable it, it works for textbox but not for textarea. If I don’t enable. It works for textarea, but not for textbox.

    I’ve included .
    Am I missing any thing here?

    Regards
    Nizam


  5. Nizam

    @Vishal
    Hi Vishal,

    I tried with the following, when I click on the textbox.

    pramukhIME.addLanguage(PramukhIndic,”hindi”);
    pramukhIME.enable();

    It working only for textbox.

    This is for textareas.
    tinyMCE.init({
    // General options
    mode : “textareas”,
    theme: “advanced”,
    plugins : “table,advhr,advimage,advlink,inlinepopups,searchreplace,print,paste,directionality,fullscreen,pramukhime”,
    auto_focus: ‘typingarea’,
    // Theme options
    theme_advanced_buttons1: “pramukhime,pramukhimeclick,pramukhimeconvert,pramukhimehelp,print,undo,redo,fontselect,fontsizeselect,bold,italic,underline,forecolor,backcolor,|,link,unlink,image,|,justifyleft,justifycenter,justifyright,bullist,numlist,outdent,indent,|,code,ltr,rtl”,
    theme_advanced_buttons2: “cut,copy,paste,pastetext,pasteword,|,search,replace,|,tablecontrols,|,sub,sup,blockquote,advhr,anchor,cleanup,removeformat,|,fullscreen”,
    theme_advanced_toolbar_location : “top”,
    theme_advanced_toolbar_align : “left”,
    theme_advanced_statusbar_location : “bottom”,
    theme_advanced_resizing: true,
    theme_advanced_resizing_use_cookie : false,
    content_css : “css/ptparea.css”,
    pramukhime_language: [
    {
    jsfile:’pramukhindic.js’,
    kbclassname:’PramukhIndic’,
    kbtitle:’Pramukh Indic’,
    languagelist:[
    {language: ‘assamese’, title:’Assamese’},
    {language: ‘bengali’, title:’Bengali’},
    {language: ‘bodo’, title:’Bodo’},
    {language: ‘dogri’, title:’Dogri’},
    {language: ‘gujarati’, title:’Gujarati’},
    {language: ‘hindi’, title:’Hindi’},
    {language: ‘kannada’, title:’Kannada’},
    {language: ‘konkani’, title:’Konkani’},
    {language: ‘maithili’, title:’Maithili’},
    {language: ‘malayalam’, title:’Malayalam’},
    {language: ‘manipuri’, title:’Manipuri’},
    {language: ‘marathi’, title:’Marathi’},
    {language: ‘nepali’, title:’Nepali’},
    {language: ‘oriya’, title:’Oriya’},
    {language: ‘punjabi’, title:’Punjabi’},
    {language: ‘sanskrit’, title:’Sanskrit’},
    {language: ‘santali’, title:’Santali’},
    {language: ‘sindhi’, title:’Sindhi’},
    {language: ‘tamil’, title:’Tamil’},
    {language: ‘telugu’, title:’Telugu’},
    ]
    }
    ,
    {
    kbtitle:”,
    title:’English’
    }
    ]
    });

    Please guide me. I’m confused with it.


  6. Vishal Post author

    Nizam,

    By default, it works for textbox and textareas. You may customize it using PramukhIME.enable() method. Please checkout documentation for further details.


  7. Nizam

    Hi Vishal,

    Great job. I’ve been looking for this type of library using TinyMCE. I’ve successfully integrated it to my textarea. But, when I type in textbox, the plugin isn’t integrated. May I know why? Or is it only for textareas? What should I do in order to apply the same for my textbox? I request you to help me in this scenario.

    Thank you,
    Nizam.


  8. Nizam

    Hi Vishal,

    Great job. I’ve been looking for this type of library. I’ve successfully integrated it to my textarea. But, when I type in textbox, the plugin isn’t integrated. May I know why? Or is it only for textareas? What should I do in order to apply the same for my textbox? I request you to help me in this scenario.

    Thank you,
    Nizam.


  9. Vishal Post author

    Raj,

    I am giving you a brief idea and you can find more information about PramukhIME javascript functions in documentation that is given with the Javascript library. There are multiple ways to do it. 1) Enable hindi only on “_inputHindiText” by providing appropriate parameter in pramukhIME.enable() method. If you completely want to turn off English, use pramukhIME.setToggleKey() function. 2) Using the onfocus event for both the textbox, you can set the language using pramukhIME.setLanguage().


  10. Raj

    Hi Vishal,

    The work that you have done it’s really amazing; I have gone through sample that you have given for JS Lib for integration with Web Base projects.
    The constraint what I see is, once you change language to let’s say “English” to “Hindi” , the moment you set the language it starts typing everything based on selected Language, whereas I was looking more like control specific, like there are two inputbox(s) has id “_inputHindiText” and “_inputEnglishText”, once I switch between the controls, the language setting should be applicable. There has to provision where we can set control specific tag or control id to enable language level typing instead of doing switching between languages using “F9”.
    There is call-back method used to manage the Language to set to default i.e “English”.

    Request your help on the same. Looking forward to hearing from you.

    Regards
    Raj


Leave a Reply

Your email address will not be published. Required fields are marked *