开发者

How to do google webpage translate in a Java class

开发者 https://www.devze.com 2022-12-23 12:58 出处:网络
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

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开发者_如何学C 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?


You can use HttpClient to perform you http requests.


You can use this api google-api-translate

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号