3
我想创建一个应用程序,发送一个单词到translate.google.com,采取翻译的结果并显示给用户。我编写了URL,但我不知道如何从网页中提取单词/短语。如何使用谷歌翻译API从代码
例伪: EN是英语和ES代码为西班牙
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;
代码因此请求的URL看起来像http://www.translate.google.com/#en/es/hello
我现在需要能够来检索信息结果框并将其放置在一个字符串中,以便我可以将其显示给用户。
由于现在谷歌翻译API已经支付,不可能通过HTTP请求获得结果吗? – 2013-07-30 23:58:55