google-translate-api icon indicating copy to clipboard operation
google-translate-api copied to clipboard

Implementation for browser

Open Londeren opened this issue 8 years ago • 4 comments

Howdy! Can you implement GT Api for using in browser?

Londeren avatar Dec 07 '16 04:12 Londeren

I'm trying to do that with Browserify, but it's not working.

rodrigoazs avatar Feb 14 '17 19:02 rodrigoazs

I'm assuming you can only implement this into your own Node server as that's what I did.

vincentchin avatar Feb 16 '17 16:02 vincentchin

You cannot implement this for a browser.

Although it might seem possible with jQuery and then call Browserify, it's not possible. You will run into a CORS error. Loading the translate page into an iframe to solve the CORS error and afterwards parse its contents isn't possible either, as Google doesn't allow you to embed translate into an iframe.

JValck avatar Jul 21 '17 08:07 JValck

https://github.com/cjvnjde/google-translate-api-browser would like to say hi, @JValck. It's a version made for exactly that, the browser.

rawr51919 avatar Mar 19 '19 13:03 rawr51919