0

I have got a big list of proper nouns in English and I need to convert them (transliterate) into Hindi language. I have found that Google input tools is an accurate way to do this. To use it, I installed Google input tools in my Windows PC and then whenever I need to write the Hindi version of a word, I just enable Hindi in the Windows language bar (Hindi support is provided by Google input tools), open the notepad and write the English word. The word gets typed in its Hindi format in the notepad. Now I could do this for all the words but the list of words is extremely long and I wish to automate the process and thus need to formulate a program (preferably in Java).

In my opinion, a broad way to look at what the program would do is as follows (Though I admit my ignorance in the matter, in which case the steps might seem ridiculous):

  1. It would load the input file containing the list of words in English and also open a .txt file for output.
  2. It would then access the language bar and change the language of input to Hindi.
  3. Now it would read each word in the list and simulate keyboard key presses of the letters in that word. As the selected language of input is Hindi, the word would be typed in Hindi (Google input tools would make this possible) in the output.txt file which can later be read.

I have listed the above steps but I have no knowledge how to do it via code. Can anybody please tell if the steps I have listed are correct and possible to do via code. Thanks.

UPDATE:
I did try to follow the above steps using help from this and this question. I was able to write into the notepad in English. But when I manually changed the language bar to Hindi and then ran the program thinking that this would write words in Hindi in the notepad, the language bar got changed back into English and the typed words were also in English. How to overcome this problem?

Community
  • 1
  • 1
AvinashK
  • 3,309
  • 8
  • 43
  • 94
  • Sounds more like you want AutoHotKey (http://www.autohotkey.com/) than Java... – Brad Peabody Sep 24 '14 at 05:59
  • I feel like trying to access the language bar is a bit backwards. Look in to whether google has a public API for translate -- I would imagine they do but haven't checked. Also, this question is likely to be closed since you haven't really demonstrated that you've tried anything at all yet. No offense. – scott_fakename Sep 24 '14 at 06:02
  • @scott_fakename...Google allows it through APIs, I have checked that...But I wanted to know about some offline method since repeated requests to the API from a single IP may not be allowed by Google. – AvinashK Sep 24 '14 at 06:11
  • @bgp... Thanks, this looks promising...I haven't checked it completely yet but if the scripts it provides allow opening a file, reading from it and typing, then I think, we have a winner – AvinashK Sep 24 '14 at 06:14

0 Answers0