Are there any APIs for programmatically translating text on the server-side?

a 夏天 提交于 2020-01-02 04:49:29

问题


I've looked at Google Translate but from what I can tell it only offers a client-side JavaScript API for freely translating text between languages.

What I need to do is translate text on the server side in Java. Is there a library that makes it possible to do this for free with Google Translate?


回答1:


Here is a Java API...

http://code.google.com/p/google-api-translate-java/

and just for reference, a PHP implementation -

http://code.google.com/p/gtranslate-api-php/




回答2:


There is nothing limiting the Google Translate API to client side code. There is a RESTful Google Translate interface available. You are free to consume this API from the client side or from javascript-originated requests from the browser. I have implemented a text localizing service using this API from the server side in the past.



来源:https://stackoverflow.com/questions/5201769/are-there-any-apis-for-programmatically-translating-text-on-the-server-side

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!