How to use the Google API to translate from code
I am trying to create an application that will send a word to translate.google.com, take the translation result and show it to the user. I made up a url but don't know how to extract a word / phrase from a webpage.
Example pseudo: en - code for English and es - code for Spanish
String from = "en";
String to = "es";
String word = "hello"; //this will be user input text really
String URL = "http://www.translate.google.com/#" + from + "/" + to + "/" + word;
Therefore the request url will look like http://www.translate.google.com/#en/es/hello
Now I need to get information from the results window and put it in a string so that I can display it to the user.
+3
source to share