Bangla Input Script as jQuery Plugin

Past Story:

About 6 months back a legal action commenced between two IT initiatives in Bangladesh. On one side there was a business firm and other end some boys working willingly as a charity to Bangla computing. If we’d follow the international trend, usually those boys were supposed to fight for their right (like many start-up companies do against giants). But, here, the copyright infringement complaint was brought to light by a powerful IT firm in the country.

If you know anything about the country’s IT sector, you may have already started thinking, what could possibly go wrong in a country where todays youngster’s IT dream begins with hope for freelance and outsourcing based work. If you are that unfortunate not to know the story, you may want to have a look here (English) or here (বাংলা) . Funny enough, this was about a “Keyboard Layout”. Neither the codebase nor the algorithm nor the hardware but the “Keyboard Layout”.

News Today:

That was a shock, followed by a further depressing news here . Anyway, today a new announcement emerged from another leading figure in Bangla Computing.

হাসিন ভাই
Portrait of Hasin Hayder

Mr. Hasin Hayder has been working on Bengali computing since 2004 or earlier. In 2006 he brought one of the key tool for online bangla composing which was web interface for phonetic bangla typing. His friends Omi Azad and Sabuj Kundu also contributed. However, that version had some issues. In Hasin’s own words,

The main problem of that script is that it was a container for both the dictionary table and the engine itself. So when someone was going to provide support for multiple layouts together, there was unnecessary inclusion of scripts. … … …  also lack of support for copy-paste support (Ctrl+C and Ctrl+V) for Mac users.

So, Hasin decided to write the complete engine as a jQuery plugin. With the table completely separate from the dictionary table, this plugin provides flexible overriding of switch key by user’s choice(with Ctrl+E ). Now anyone can develop their own layout (mind that Lawsuit?) just by writing the dictionary table.

Among the 4 files included in the plugin, engine.js is the main parser script, and is a jQuery plugin itself. driver.phonetic.js and driver.probhat.js are two keyboard specific dictionary files where you can make changes to modify the layout. Initially driver.probhat.js contains the mapping for the Probhat keyboard which can be modified to have virtually any layout or mapping.

Here is how to use the pluging:

How to use this script

1. Give all your “Input” elements a class name “bangla” – for example

<input type=’text’ class=’bangla’ />

or

<textarea class=’bangla’></textarea>

2. Initiate the plugin in document.ready event That’s also pretty simple

$(document).ready(function(){
$(".bangla").bnKb({
'switchkey': 'y',
'driver': phonetic
});
});

If you want to add this plugin to your site, you can freely do so. You don’t have to pay any money to anyone. For further information please follow this link.

I know this tool won’t make Hasin Hayder and his colleagues face death from starving. Thanks to the developer(s).

Download from here:

[dm]1[/dm]
[dm]2[/dm]

4 Replies to “Bangla Input Script as jQuery Plugin”

  1. অসাধারন কাজটির জন্য ধন্যবাদ।

    আমি যেটি বানাতে চাই তার ৯৫% ইউজারই বিজয় ফন্ট/ম্যাপিং এ টাইপে অভ্যস্ত। কাজেই আমার পেইজে বিজয় কিবোর্ড থাকতেই হবে। আপনার কাছে কি driver.probhat.js এর মতো driver.bijoy.js পেইজ আছে যেটা আমাকে দয়া করে দিতে পারেন। আমি আপনার দেয়া জাভাস্ক্রিপ্ট পেইজের keymaps কোডিং এ বিজয় অনুসারে কোড বসিয়ে নিতে জানি না বিধায় আপনার সরনাপন্ন হলাম।

    সম্ভব হলে সাহায্য করবেন। আপনাকে অগ্রীম ধন্যবাদ।

    1. আপনার মন্তব্যের জন্য ধন্যবাদ। কিন্তু, দু:খের সাথে জানাতে বাধ্য হচ্ছি যে, বিজয় কিবোর্ডের কীম্যাপ বা কোন ধরণের রূপান্তর বিতরণ করা বিজয় নির্মাতা প্রতিষ্ঠানের বক্তব্য/দাবী অনুসারে বৈধ নয়। আপনি চাইলে একান্ত নিজের ব্যবহারের জন্য ড্রাইভার স্ক্রিপ্ট ফাইল বানাতে পারেন , তবে নিজের ওয়েবসাইটে দেয়া আপনার জন্য আইনীগত দিক থেকে ঝামেলাজনক হতে পারে। (বিজয় বনাম অভ্র লড়াই দ্রষ্টব্য)

Leave a Reply

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