Atul Gupta
Atul Gupta

Reputation: 217

using Google translate service api in Java

I am facing difficulty using google translate service api from my java code. For google translate I don not need to use OAuth, so I am simply firing the URI along with the required parameters but getting all sorts of errors like 404 or file not found exception.

URL - https://www.googleapis.com/language/translate/v2
Parameters - key=**********&q=Please%20translate%20me.&source=en&target=fr

I am not able figure what else is required. If anyone of you can guide me or direct me to some example code or blog would be really helpful.

Upvotes: 2

Views: 3150

Answers (1)

Atul Gupta
Atul Gupta

Reputation: 217

Got it working following this blog post. Looks like it doesn't need OAuth to make it work from Java code. Just api key is enough.

http://hayageek.com/google-translate-api-tutorial/#java-example

Upvotes: 2

Related Questions