Transliteration

Transliteration is Blogger’s cool new feature. Just amazing.

What it does is simple: you type in Hindi stuff phonetically in English, and it converts it into proper Devanāgarī characters. So, by typing in ‘Ankit’ into Blogger’s post page, I get ‘अंकित’. On the fly. Simply too cool.

Writing in anything other than English is too hard. I know, I’ve tried it. Here are your main options:

  1. Setup your computer to use a different keyboard layout for other languages. This is really awkward. I used a permanent marker on keyboard and marked what all the keys map to when entering Hindi/Gujarati, just to help my Mom a little bit. It wasn’t much use.

  2. Use some one screen keyboard software. Point and click. Too slow.

Google may just have come up with a winner here. This is a very nice compromise, as most of us Indians are already used to typing Hindi phonetically in English.

Read any further at your peril. Here be nerdiness.

I poked around with Firebug, and all queries seem to go to the URL:

http://www2.blogger.com/transliterate/indic?tlqt=1&langpair=en|hi&text=yourInputText

The output is JSON. You get multiple suggested output values for input text. Example output for text=google:

while(1);
[
{
"ew" : "google",
"hws" : [
"गूगल","गुगल","गूगले","गूग्ले","गूग्ल",
]
},
]

I’m guessing that ew stands for ‘English word’ and hws for ‘Hindi words’. So for an input word ‘google’, the suggested Hindi words are “गूगल,गुगल,गूगले,गूग्ले,गूग्ल”. The rest is up to the client—to do what it wants. A simple, and powerful web service.

It even supports multiple words, comma-separated. The output for text=hello,world:

while(1);
[
{
"ew" : "hello",
"hws" : [
"हेल्लो","हेललो","हेल्लों","हेल्लओ","हेललों",
]
},
{
"ew" : "world",
"hws" : [
"वर्ल्ड",
]
},
]

Ya, I could not resist putting in a ‘hello world’ in there…

Too bad, the URL seems to be require you to be already authenticated, else it gives a 404. If they were gonna require authentication anyway, why put in an infinite loop—while(1);—in the output? Kinda nasty to anyone who tries to eval it.

I really hope that they put up a GData API for this, soon. And that they start supporting more languages. And they add this feature to Google Docs, et cetera.

Ya, the more they offer, the more I demand.

Comments (7)

  1. Sunil wrote::

    Sexy post Ankit!! You outdid your nerdiness here. Brilliant stuff

    Sunday, March 11, 2007 at 10:52 #
  2. ankur wrote::

    now we are talking ;-) … loved the post

    Sunday, March 11, 2007 at 12:33 #
  3. Ankit Solanki wrote::

    Thanks, all :)

    Sunday, March 11, 2007 at 12:53 #
  4. River wrote::

    Simply Great. I definitly agree with Sunil and Ankur…

    Sunday, March 11, 2007 at 19:47 #
  5. Akshay Shah wrote::

    Bahut Ache… Computer Kide!

    Tuesday, March 13, 2007 at 11:38 #
  6. Sunil wrote::

    Abbe saale…
    When you recommend videos on Javascript dont mention yahoo as the source. Mention me!!!!

    Saturday, March 17, 2007 at 8:27 #
  7. Ankit Solanki wrote::

    Not everyone has a friend with a faster connection who downloads such stuff for 'em :)

    Saturday, March 17, 2007 at 10:17 #