Kevin
Kevin

Reputation: 6833

How to do google webpage translate in a Java class

this is a follow-up question of mine. Suppose now I have a URL :

http://www.baidu.com/s?bs=%B0%C2%B0%CD%C2%ED&f=8&wd=%B0%C2%B0%CD%C2%ED

and it work perfectly by inputting it in the text field of google translate and select from "Chinese" to English.

My question is ,suppose now I want to achieve this in Java, I would like to adopt Process q=Runtime.getRuntime().exec("cmd /c start +URL") approach to do this. Could I achieve that by simply concatenating the Google translate URL and the webpage URL?

Upvotes: 1

Views: 243

Answers (2)

Enrique
Enrique

Reputation: 10117

You can use this api google-api-translate

Upvotes: 1

Roman
Roman

Reputation: 66156

You can use HttpClient to perform you http requests.

Upvotes: 2

Related Questions