google-translate-api
google-translate-api copied to clipboard
Doesn't work in browser
I'm trying to use this in an Angular 7 app, but it seems this is not possible?
This lib is for Node.js.
It doesn't work in browser because it uses cross origin requests. I made it work here google-translate-api-browser. It uses cors-anywhere
It doesn't work in browser because it uses cross origin requests. I made it work here google-translate-api-browser. It uses cors-anywhere
I think you should definitely mention that all requests are proxied via http://cors-anywhere.herokuapp.com
. If that app goes down or your users pass sensitive data for translation - it may have impact on you.
Ye. @cjvnjde, I carried over the additions and fixes that were added recently into vitalets' fork of this repo over to yours. Go ahead and take a look at that PR and see if things still work like they should over there with the new code in place.
In case others are looking here is an up-to-date axios port: https://github.com/AidanWelch/google-translate-api