Open yhy20 opened 3 months ago
Please navigate to line 52 in /node_modules/translatte/index.js, and where you find the following code:
opts.services = opts.services || {google_free: true};
You'll want to modify it to:
opts.services = {"microsoft_v3": {"key": "YOUR_KEY_HERE", "location": "global"}};
Currently, the supported services are as follows:
Google Translate (Free) - {"google_free": true}: The default service that is free and unlimited. Google Cloud - {"google_v3": {"project-id": "XXX", "token": "YYY"}}: Requires sign-up and credit card info. Offers 500,000 free characters each month, then charges $20 per million characters. Microsoft Azure - {"microsoft_v3": {"key": "XXX", "location": "global"}}: Requires sign-up and credit card info. Provides 2 million free characters each month, then charges $10 per million characters. Yandex Translate - {"yandex_v1": {"key": "XXX"}}: Requires sign-up. Offers 10 million free characters each month.
I've already tried setting up the project, but now I've run into an issue. If I want to utilize Microsoft cognitive service's translation feature, how should I modify the code?