aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes translate from English to Hindi Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "translate from English to Hindi" Watch "translate from English to Hindi" New topic
Author

translate from English to Hindi

Anish Kumar Singh
Greenhorn

Joined: Nov 03, 2010
Posts: 4
Hi,

can anybody help me to translate from english to hindi

i have two text boxes and of name "text" "textcopy" now when i type in text box 1
i want that text to be converted to hindi and typed at the same time in the second text box.





the above code copies the contents of the textbox 1 in real time into the second text box.

now i want to use google API to translate for which i have a sample code but that does not do the work.


Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
...that does not do the work...

ItDoesntWorkIsUseless

What does it do, exactly? Are there any error messages in the JavaScript console? Does the request actually go out to Google? If so, is the request structurally equivalent to successful requests made by other means?
Anish Kumar Singh
Greenhorn

Joined: Nov 03, 2010
Posts: 4


the translation does not happen.

but when i type in the second box then after the space bar is pressed the word is translated.

actually i think i need a code to read the word before spacebar is pressed and then send that word to google for translation, and print the output in the second box.

any ideas or thoughts would be appreciable.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Lester Burnham wrote:Are there any error messages in the JavaScript console? Does the request actually go out to Google? If so, is the request structurally equivalent to successful requests made by other means?
Anish Kumar Singh
Greenhorn

Joined: Nov 03, 2010
Posts: 4
Are there any error messages in the JavaScript console?
no error messages are there

Does the request actually go out to Google?
i don't think so . it does not go out to google. but how do i check that if it goes out to google or not.


If so, is the request structurally equivalent to successful requests made by other means?
yes the structure is correct, the method is given in the google transliteration documentation.



i have also tried the code for checking spacebar keypress.



do you think the above if integrated can be of some help.

Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Anish Kumar Singh wrote:but how do i check that if it goes out to google or not.

By using an HTTP Monitor or proxy, or a Firefox plugin like LiveHttpheaders.

yes the structure is correct

You can't know that unless you observe both a successful and an unsuccessful request in one the tools mentioned above.
Anish Kumar Singh
Greenhorn

Joined: Nov 03, 2010
Posts: 4
Thanks for replying Lester.

i'm posting a code below, please run and check what it does.

it work's but the transliteration does not work. it also goes out to google.

only when we type in the second text box.

the code below does english to greek.


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: translate from English to Hindi