matheuss / google-translate-api

A free and unlimited API for Google Translate :dollar::no_entry_sign:
https://npmjs.com/package/google-translate-api
MIT License
2.9k stars 608 forks source link

Add region options #122

Closed LittleSheep2Code closed 1 year ago

LittleSheep2Code commented 3 years ago

I add a region option, let different region can get fast speed to access server. Example:

translate('Hello!', {to: 'en', region: 'cn'})
      .then(console.log);

PS. I delete my fork repo, so I recreate a pull request XD

ZiuChen commented 2 years ago

google-translate-api-cn may you need.

LittleSheep2Code commented 1 year ago

I think this change is useless now. Because google just stop service in china mainland. So translate.google.cn domain is doesn't work. And in other country, I think they didn't need to access google's other domain. Just use the google.com is OK.