问题
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