| | |
| | | public String translate(String langFrom, String langTo, |
| | | String word) throws Exception { |
| | | |
| | | |
| | | langTo = "ar-SA"; |
| | | //不为空则设置代理 |
| | | // String proxyHost = PropertiesUtil.getProperty("https.proxyHost"); |
| | | // String proxyPort = PropertiesUtil.getProperty("https.proxyPort"); |
| | |
| | | * 谷歌翻译 传string 反string |
| | | */ |
| | | |
| | | public String translate(String content,String lang) throws Exception { |
| | | public String translate(String content,String lang) { |
| | | StringBuilder result = new StringBuilder(); |
| | | if (content.length() > 1000) { |
| | | int size = content.length() /1000 ; |