Using Google Translate API V2 on Google App Engine project
I'm setting up a Google App Engine project that provides a simple XMPP tr开发者_运维知识库anslation service: Send a message to the bot using Google Talk, the bot replies with the translated message.
In Eclipse, I added the Google Translate API, however it added the V2 API (google-api-translate-v2-java.jar
)
Now, there's nowhere I can find any documentation or sample on how to use this labs api.
Can anybody provide me with a simple sample on how to translate a message using that API?
The Google Translate API has been deprecated, as of May 26, 2011. It will be shut off completely on Dec 1, 2011
http://code.google.com/apis/language/translate/overview.html
The examples are right there on the link you provided: http://code.google.com/apis/language/translate/v2/getting_started.html#REST
Some other examples here: http://code.google.com/apis/language/translate/v1/getting_started.html#hiworld
Java non-official API: http://code.google.com/p/google-api-translate-java/
You can try using google-translate-api-v2-java
精彩评论