Tuesday, September 2, 2008

Type in your local language - Firefox Extension

Ever wanted to chat in Tamil(or any other Indian Languages) from Zoho Chat or Gmail Chat? I have been longing to do so ever since i saw this feature in Orkut.

Google recently released their Language API, which include Translation and Transliteration APIs. Using their Transliteration API, we can convert any English text to native language(Ex: Tamil can be changed to தமிழ்) on the fly(like in Orkut). This feature is really useful while we chat or post comments.

Of-course we cannot expect every site we use to integrate this feature...but we can anytime build an extension in Firefox to fulfill our requirements. So one fine day i sat down and started writing a GreaseMonkey script...which happened to work in Firefox-2 and failed to work in Firefox-3. Dejected by the output, started porting the code as an extension, which worked fine in FF3 after a couple sleepless nights!


Here is the Firefox Extension i wrote to get the Transliteration feature plugged in to sites like Zoho Mail and GMail. As the extension is currently under Experimental category, you will need an account to install the extension. IE users please excuse :)

Currently the extension can transliterate the texts in 'textarea' alone. Hopefully will extend this feature to editable iframes very soon.

The extension is still in early stages, so bugs are common :). Please share your thoughts and report any bugs you face here.

Update 1: Version 1.0.3: Lots of bug fixes, Preference box with default language, text box support based on user preference

Update 2: Verion 1.0.4: Performance and issue fixes. Recommended Install.

Update 3: Verion 1.0.5: Textarea/textbox style corruption issue fixed. Recommended Install.

Update 4: Addon is now Public!! You dont need an account anymore to install your copy!

58 comments:

Peeyush said...

how does one use it in gmail? the dropdown menu does not show up.

Sridhar said...

hi peeyush!

If you had installed the extension and restarted firefox, in gmail, the dropdown shows up when you click on the textarea of the chat box(like in the image above). Did you install the latest 0.0.5 version of the extension? the earlier version had some problems with initializing on unfocused tabs and Firefox 2.0.

please let me know if you still got issues bringing up the dropdown.

Jerry said...

Great work Sridhar.
It works like a charm.

Vamsi said...

good one. it would be nice to have only selected languages (say, selected as options in your extension's settings). most of the time i would like to just have one language and so i won't need to use the dropdown every time to select the language.

Sridhar said...

thanks Jerry!

Sridhar said...

@vamsi,
thanks for feedback!

currently, the last selected language for a site will be set in cookie(of each site) and will be selected automatically when you visit that site again. Planning on a preference dialog with include/exclude sites. will try to squeeze in this feature too in the next update.

Mohan said...

மாப்ப்லே, கலக்கிட்டே மச்சி . ரொம்ப நன்றி

Mohan said...

Sridhar, you have done a fantastic job with this cool add-on. Want to come work for us :-)...

Sridhar said...

@vamsi,

install the latest (1.0.3) version.
preference box has been added!

Sridhar said...

@mohan,

thanks for the offer, me happy where i am ;)

btw, which mohan is this?

raj said...

Hello Sridhar,
Is there anyway I can get a gujarati font for my personal use too?
Thanks for your grand efforts and great job.
Raj Sangoi
NJ _ USA
sangoiraj@gmail.com

Sridhar said...

hi raj,
Thanks for dropping by!

The extension uses Google Client Side Language API for Transliteration. Google havent supported Gujarati yet. Once a new language is supported(by Google), it will automatically show-up in the language list of the extension.

Anonymous said...

ரொம்ப நன்றி ஸ்ரீதர்! you have done a marvelous job!

dghnfgj said...
This post has been removed by a blog administrator.
sreehemanth said...

Sridhar..

I am trying to use the 1.0.4 version this add-on in my Firefox 3.0.6 web-browser, in the "Newer Gmail" inbox; but I could never get it to work.

I also have "NoScript" add-on activated in this browser; does this affect the working of your add-on?

Please give me a detailed solution to my problem. An email reply would be great appreciated. Thank you.

Sridhar said...

@sreehemanth,

Guess you are trying to type in your language in the Compose dialog of gmail. But its designed only for textboxes and textarea, meaning you can currently use the addon in the chat box or google search box.

Hope this helps.

sreehemanth said...

But the release notes mentions that this add-on is now compatible with Gmail and Zoho Mail...!!

Is it still too far off to be able to integrate it with the Gmail compose section?

Sridhar said...

@sreehemanth,
I think you missed the following line!
"Hopefully will extend this feature to editable iframes very soon."

There is a google lab feature coming up to support typing in indic languages inside gmail compose box(which is an iframe). There is no point duplicating the same feature again.

Will wait for few couple more weeks before i start doing this feature.

sreehemanth said...

Sridhar:

Thank you for the prompt reply.

I just can't wait to see this feature to be added into gmail labs.

That will, I hope, make it browser-independant. What say?

Also, if iframes are supposed to be the "compose" section in an email, then (after upgrading to with this functionality) will your add-on work in other email accounts - yahoo or otherwise?

Sridhar said...

@sreehemanth,

Yeah if the labs feature comes out, it will be browser independent!

And yeah, if the feature is done in the addon, it will work in yahoo and other mails too!

Will give it a try in couple weeks.

Naveen said...

wow ...wat a add on !!! really cool one ... pls work on iframes.. to website independent ... wish u all the best

malayalee said...
This post has been removed by the author.
Naveen said...

can u include that in search bar(firefox) also ?

Sridhar said...

@naveen,

Thanks for using the addon.

You can activate text box support by selecting the same from the transliterator preference dialog(in the tools menu).

Refer the below image.

https://addons.mozilla.org/en-US/firefox/images/p/29523/1220357132

Hope this helps.

Naveen said...

Firefox Search bar on right top corner.... i think transliteration is not working there

Sridhar said...

@Naveen,

Oops! I thought google search! Sorry, currently it works only in the web pages..nice feature though..will try to push it!

111 said...
This post has been removed by a blog administrator.
Ramasundar said...

எவ்வளவு நாளா இதுக்காக காத்திருந்தேன், ச்ச கலக்கிடீங்க ஸ்ரீதர்.

shriyantra said...

धन्यवाद Thanks Good work for chat and textbox. I am looking chat box slightly up and length changed and if any suggestion very far away from chat right side. please look also on these point and try to clear in next update. I have posted with pictures on blog also. Lab feature for writing mail awaited.

Sridhar said...

@shriyantra,

thanks for trying the addon and posting a blog about it! Planning to provide language box custom positioning option. You will be allowed to place the language drop down box anywhere of your choice.

TeleRaviRays said...

Sridhar, Excellent add-on. I'm missing it now because I've already switched to Firefox 3.1b3. Hope to see a compatible update soon.

Sridhar said...

@teleravirays,

Thanks for using the addon!

I had already updated the addon to work with 3.6b4pre. That makes it compatible with 3.1b3 too. Install the latest 1.0.5 version and let me know if you still face compatibility issues.

TeleRaviRays said...

You're awesome, Sridhar! Just downloaded the new version. I love the way it appears in the GMail compose box.

I will test it and let you know if there are any kinks. I noticed one thing though - when I type something in a GMail embedded chat using transliterate, and backspace to erase it, it disturbs the entire page. Can you please look into it?

Thank you for upgrading it so soon.

Sridhar said...

@teleravirays,

Yeah i am aware of this issue. The latest update in google language api lead to this bug! Will fix it soon.

Shashank said...

Very impressive GM script. Love the stickiness you added to the lang pref. Just in time i wanted one :)

Anonymous said...

यह बहुत ही अच्चा प्लगइन है | मैं ऐसी ही कोई चीज़ ढूँढ रहा था |

Tamil said...

நன்றி!

Kannadiga said...

ತುಂಬಾ ಚೆನ್ನಾಗಿದೆ. ಧನ್ಯವಾದಗಳು.
(Very nice. Thanks.)

Is there a keyboard shortcut to select the language? Like CTRL+G does in Orkut scrapbook..?

Sridhar said...

There is no shortcut for selecting each language. But "Ctrl+G" works with the addon too(if thats what you meant).

mugunthkumar said...

நன்றி தல...

Vaibhav said...
This post has been removed by the author.
Vaibhav said...

बहुत बहुत धन्यवाद् ...you have done a great favor to all who want to write in their own language

Anonymous said...

Nice Work Keep itUp. May god help You...

BOSS said...

ಸೂಪರ್! ಥಾಂಕ್ ಯು
Super! Thank You

Yogi & Mit's Blog said...

સરસ ટૂલ છેં.

Anonymous said...

हे फार छान आहे . Very good work. is there any way to make it work with hotmail ?

धन्यवाद !!

Anonymous said...

Google API started offering Urdu as well. Any chance of getting that selection? I see Arabic is already there.

Brilliant work btw, thanks for making this an extension!

cheers

Amir

Sridhar said...

@Amir,

Thanks for using the addon!

Dynamic addition of languages in settings dialog is yet to be done and I will make sure its done in the next update.

Sridhar

Anonymous said...

Peeyush,

I downloaded this add-on: Google Indic Transliteration 1.0.6

Now, how is this supposed to work? I saw lots of translated post here so it must work here!

Currently, I see little tab on these text-box and I chose Gujarati but still it types in English. Any Instruction would be helpful.
Raj

KedarsThoughtsWork said...

श्रीधर,

Excellent Job! Kudos!

Anonymous said...

फार छान मित्रा!
ரொம்ப நன்றி சார்...

Ali said...

Hi,
Brilliant concept. I installed thinking I would be able to write in Urdu... but that is not one of the options. Is there a way to do that? Or an upgrade available which will make Urdu available?

Sridhar said...

@Ali,

Yes you can very well type in Urdu. Urdu will be listed as the last option in the list-box.

Btw, I assume you are trying to type in Urdu in a text box, rt? Do you see a light blue list-box in the top right corner of the text box?

سردھڑ

Sunil said...

Dear Sridhar,

Is there any way to use this feature with CorelDRAW

Anonymous said...

In Firefox, Tools > Transliterator Preference, Please tick on "Enable Transliterator for text box too." below "TEXTBOX SUPPORT"

There will only 4 language is listed but Google Indic Transliterator support 12 languages including URDU.

شکریہ سدھر
(Thanks Sridhar)

Sridhar said...

Hi,

Yeah, only 5 languages will be displayed in the preference dialog. Will change the code to dynamically fill the options combo from next update.

Thanks,
Sridhar

അംജിത് നെടുംതോട് said...

great work dear .. u rocks

Raees said...

good work sridhar.........

very useful tool