Has anyone tried google translate api v2 (and got it working)?

I experimented with google translate api v2, but I could not get it to work.

this is the current code i have: http://juzcode.com/z.html (just go to the page and view the source)

I can use google translate api v1: http://juzcode.com/y.html

Does anyone know why Google rejects my request at http://juzcode.com/z.html ?

+5
source share
2 answers

API v2 , . http://code.google.com/apis/console/ .

, URL-. , https://www.googleapis.com/language/translate/v2?q=hello%20world&source=en&target=de&key=(my key > ), :

{
 "data": {
  "translations": [
   {
    "translatedText": "Hallo Welt"
   }
  ]
 }
}
+3

: http://code.google.com/p/jquery-translate/

, v1 , query.translate.js, , , : $.translate.load('API-KEY'); !

0

All Articles