谷歌翻译的 Java 工具类:
2019-06-22
笔者通过反编译还原了代码,并且修改了下代码
https://github.com/junjun888/google-translater
调用如下:
public static void main(String[] args) throws Exception { // 普通方式初始化 GoogleApi googleApi = new GoogleApi(); // 通过代理 // GoogleApi googleApi = new GoogleApi("122.224.227.202", 3128); String result = googleApi.translate("hello world", "zh"); System.out.println(result); }
输出:
你好,世界
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/204611.html原文链接:https://javaforall.net
