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!

Update 5: I am(was) lobbying hard to get the latest version of the addon reviewed. Will try harder when I get more time. Till then please use the experimental version from here: https://addons.mozilla.org/en-US/firefox/addon/google-transliteration-formerl/versions/?page=1#version-1.9


100 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.

Unknown 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.

ms said...

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

ms 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?

prekshak 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!

Anonymous said...
This comment 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.

Anonymous said...

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

Naveen Francis said...
This comment has been removed by the author.
Anonymous 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.

Anonymous 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!

Anonymous said...
This comment has been removed by a blog administrator.
Ramsundar Kandasamy said...

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

shri 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).

Anonymous said...

நன்றி தல...

Vaibhav said...
This comment 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 Umer said...

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

very useful tool

Anonymous said...

is there any way that I can use only one language and remove all others from dropdown menu?

Sridhar said...

Currently its not possible. But you can select the default language from Settings dialog. New languages will not be listed in this dialog. This issue will be fixed in next update.

Pranav Ainavolu said...

Sridhar,

Really great work!
It is very helpful to many people like me who types the text in their regional language somewhere (like Google Transliteration WebPage), copy it and paste it in required text box.

Now, i could chat in Telugu (my mother tongue) in GTalk too. Its just because of your plug-in.

Thank you very much!

Expecting many more useful tools from you in future...

All the best!


Cheers,
Pranav

Anonymous said...

Hey Sri.. Can you upl0ad your source code please..

Anonymous said...

Dear sir,
Is it work for ubuntu 9.10?
I tried but it doesn't work.
Please direct me.

TamilRadios said...

Its Very Usefull tool

Sappling said...

I've been trying to figure out how to transliterate from Gurmukhi to Shahmukhi. Doing it by hand is terribly tedious, and I was hoping to find someone to point me in the right direction for writing a program that could do it in Ruby or Python. The first step is simple; I need to switch the Gurmukhi letters or Shahmukhi. But then I need to transpose them because Gurmukhi is left to right and Shahmukhi is right to left. I came to your blog because you wrote the transliteration add-on for Google and I figure the principles should be very similar.

Naveen Francis said...

Hi Sridhar, Can you add sanskrit to the addon ? A group of people is waiting for sanskrit to included ? :)

Aero said...

Thank you Sridhar. You have done a great job.

electron said...

how can i increase font size of my text in fb chat window?

Unknown said...

meray liyay pata nahi kyun kaam nahi kar raha hai...

Unknown said...

Hi,
Thanks for this excellent add on :)

I am a little bit confused about typing some special symbols using Bengali though.

For example, when I want to write "চাঁদ" (I wrote this using a software, not plug in),I type "cad" which is automatically converted to "চাদ", the upper symbol doesn't show up.
Can you please tell me how should I type it?

Also, in Transliterator preferences , (the one which shows up after pressing Ctrl+F8) the default language options are limited to only 5 languages.
Can you include all available options there? It would be even more cool :)
And once again. thanks for creating this excellent software.

ধন্যবাদ :)

Oh. I would like to give a little suggestion if you don't mind.

Please include a shortcut key to enable/disable literator. Moving hand away from keyboard and using mouse to enable/disable it seems a little bit inconvenient.

Unknown said...

oh... I found the shortcut key.
It is ctrl+g
but please, help about the special symbol insertion :)

Unknown said...

Installed 1.0.6 on Firefox 4 beta1 on Mac.. does not work..any suggestions..

chiru the megastar said...
This comment has been removed by the author.
Anonymous said...

showing dropdown box containing languages, but when i try to type telugu in english script its not working. remaining as english. anybody can suggest me.

Anonymous said...

Great extension..Thank you very much Sridhar!!!

MountCleverest said...

hi, i have been using this addon for quiet some time now, but since last couple of days i have been noticing a strange behaviour(mainly in facebook), that the font for native language appears different(bigger in a way) if the addon is enabled, which causes lower part of the lower line(2nd line in case of any comment on FB) to be below the visible area. It stays like that, until you reach the end of the line and the text area expands by making another blank line visible.
Anyone else noticed this behavior yet?
PS: The issue didn't occur in this textbox of comments section on blogger. Perhaps just limited to FB...

Sameer Thikkodi said...

hi there,

could u pls advice it is not working with firefox version 4 !!

Thnx

Sridhar said...

Hi Sameer/All,

Have updated the addon to work with 4.0. Its under review and has been rejected couple times before due to some valid reasons. Hope it gets reviewed this time. Meanwhile use the below update.

https://addons.mozilla.org/en-US/firefox/addon/google-transliteration-formerl/versions/?page=1#version-1.9.4

Sridhar said...

@MountCleverest, will check out what goes wrong...

esudip said...
This comment has been removed by the author.
esudip said...

I installed the Experimental add-on on Firefox 4. I will let you know if there is any bug. Thanks for your hard-work. I m using your plug-in since last 2 yrs.

Rafi said...

Hi sridhar garu,
Since long, I'm badly addicted to this addon :)

Can you please make it compatible with Direfox 4.0.1? Thanks a lot...

Sridhar said...

Rafi garu, try 1.9 version of the addon from here:

https://addons.mozilla.org/en-US/firefox/addon/google-transliteration-formerl/versions/?page=1#version-1.9

it is yet to be reviewed. But works as good as older versions.

Rafi said...

sridhar garu,
first of all, my sincere thanks for the prompt reply. I tried even that experimental version also, but the message thrown to me was "Google Indic Transliteration could not be installed because it is not compatible with Firefox 4.0.1"

Shall I need to revert back to FF 4.0? My life has become miserable without this addon..

Sridhar said...

@rafi oops...not sure what went wrong. its actually compatible with 4.0.*. Did not work for me as well.

Will do an update this weekend adding the latest version of FF.

இமலாதித்தன் said...

Vanakkam thalaivaa,


unkaludiaya tamil translaretion addons, ippo firefox latest version 4.0 ku mela ulla endha browser la layum support panna maattuthu. disabled aaki iruku. adhaiyum ennaanum kavinka thalaivaa..
nandri.

Muhammed Thaha said...

Hi Sridhar,

Thanks for this wonderful addon. I've been using this for ages now. :)

But, after upgrading to FF4.0.1, it is not working. Could you please provide an update that would work well with FF4.0.1 also.

Became addict using this. Can't live without this now. :)

Thanks,
Thaha

Anujgujjar said...

hi sridhar sahab,

aapka addone sirfaapka hi hai
i means isse similar bhi koi aur nhi hai ...

very very good application.

ab hume aur kitna injaar karna padega .
4.0.1 ke addone ke liye

Tom said...

Will you be adding Hebrew any time soon?

bons alias bondamani said...

Hi,
Can u make this useful extension compatible for firefox 4 also ?
Thanks ....

bons alias bondamani said...

Hi,
Can u make it compatible for firefox 4 also ..?

Thanks ..

Rafi said...

HI friends,
see if this one could be of any help.
https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/

Sankar said...

Brilliant. Thanks.

This extension however asks for accessing all browser history. So, this is a little scary to install. Will you be ready to open-source this extension so that people can install without fear ?

Thanks a lot.

Sridhar said...

@shankar,

Its already open source. All addons/extensions are open. Just unzip it and you can find the source.

The addon will not access your history btw.

Sankar said...

@Sridhar: Thanks. However, I assumed that the source may be obfuscated etc. My mistake. I should have checked. Thanks :-)

Sridhar said...

It isn't and I dont intend it to be obfuscated in near future :)

hrishikesh said...

It is not working for latest firefox versions. Could you make it compatible for newer versions as well?
Also is there any other / similar add on for other browsers such as chrome or IE ?

vijay mehta said...

almost one year back when I use this addon .....suparb .......but now this time (: (: ....as other friends said.....not working for upgd versions.....????? when we got cmpetiblity for further versions.....thanks ...
VIJAY MEHTA, WEB EDITOR Daily JALTEDEEP Jodhpur (rajasthan)

Sridhar said...

Hey Vijay. Sorry about not upgrading the addon. Firefox made a mess in their addon updation process, so stopped trying.

Try this Chrome version of the addon: https://chrome.google.com/webstore/detail/ghjghohnjkjkbgpbeedbjdgcnikdibbm

Anonymous said...

Simply want to say your article is as amazing.The clarity on your submit is simply great and i can
think you're knowledgeable in this subject.
website design