Google Indic Transliteration – Cool application

Google keeps coming up with innovative stuff, Google Indic Transliteration is one of latest additions. It allows English to Hindi transliteration.

It’s an AJAX application with pretty neat user-interface. I have started using it, and spread the word among my friends. The moment I saw, I thought, if there is an API to use it on our application. I don’t know, if there is one. I digged and found this URI:-

http://www.google.com/transliterate/indic?tlqt=1&langpair=en|hi&text=wahan%2Caap&tl_app=3

It would return the JSON data (you might not see some characters):-
while(1); [ { “ew” : “wahan”, “hws” : [ “वहाँ”,”वहां”, ] }, { “ew” : “aap”, “hws” : [ “आप”, ] }, ]

You can send multiple English-words by separating them with comma (,).

That’s all, we need to use it in Flex/AIR app. Web-based Flex/Flash applications might require a server-side proxy to use this service, I am not sure, if Google’s crossdomain.xml allows access to third-party applications?

Technorati tags: ,

  • you know the majority of people reading this will read “transliterate” as “translate” 😉
    icu4j has had this functionality for years: http://icu-project.org/apiref/icu4j/com/ibm/icu/text/Transliterator.html
    though it’s based on writing system scripts so “hindi” would be unknown to it, maybe DevanāgarÄ«?
    we wrapped a CFC around this functionality quite a while back.

  • khool

    i think they use multiple words trnslation in their blogger interface – http://www.blogger.com/hindi
    i selected a bunch of english words and pressed the button to get them translate

  • Ashfque

    It would return the JSON data (you might not see some characters):-
    What do you mean by this? and how can I fecth the translated data through my C# application any idea?

  • @Ashfque:
    > It would return the JSON data (you might not see
    > some characters):-
    > What do you mean by this?
    I meant that you might not see some characters in this post, it all depends on your browser and machine.
    > and how can I fecth the translated data through
    > my C# application any idea?
    You can use HTTP classes to get most of things done… Probably HTTPWebRequest/HTTPWebResponse?
    -abdul

  • Sanket

    How do i fetch the data generated by google transliteration API in c# ? ( Im using Visual Studio 2008 )

  • Poornima

    Hello Abdul Qabiz,
    I’m using google transliterate as you have mentioned. I’m geeting the result as [ { “ew” : “Hello”, “hws” : [ “हेल्लो”,”हेललो”,”हेल्लओ”,”हेल्लों”,”ःएल्लो”, ] }, ] in the browser but in my c# application,in the textbox i’m getting like below
    2361;2375;2354;2381;2354;2379;2361;2375;2354;2354;2379;2361;2375;2354;2381;2354;2323;2361;2375;2354;2381;2354;2379;2306;2307;2319;2354;2381;2354;2379;
    Here i have removed the headers and members in the array bcoz if i put all the headers then it will display the actual output on this browser.
    I’m unable to parse this using JSON.am using Jayrock.Json library..please help me how to go about this?

  • @Poornima: I am not sure what’s going wrong. Perhaps, it requires unicode support in your application? Specially textarea where you are trying to show?
    Did you check, if you getting text properly on client side? Is it just textrea not able to show it properly?
    You might want to check for an API in textarea that’s for showing unicode text?
    -abdul