Are there any APIs for programmatically translating text on the server-side?
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 i开发者_Python百科s translate text on the server side in Java. Is there a library that makes it possible to do this for free with Google Translate?
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/
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.
Although this is an old question, for anyone that comes here and is looking for a more up to date answer, there is the Google Cloud Translation API which is Google's fuller translation package, with the "Advanced" version being server-side only (does not allow API keys).
It comes with an official Java client.
Also, it is free for the "First 500,000 characters* per month".
精彩评论