google-translate-api
google-translate-api copied to clipboard
`res.from.language.didYouMean` is always true
When I use the Google Translate website from English to Dutch, and enter the Dutch word "Kaartspel" in the English from box, it shows "Translate from: Dutch":
See: https://translate.google.com/?sl=en&tl=nl&text=Kaartspel&op=translate
When I use this API:
const res = await translate('Kaartspel', { from: 'en', to: 'nl', autoCorrect: true, requestFunction: fetch});
console.log(res.from.language.didYouMean);
console.log(res.from.language.iso);
It prints:
true
nl
This is correct ✅
Repeat with a correct English "Card game", there is no warning in the portal:
See: https://translate.google.com/?sl=en&tl=nl&text=Card%20game&op=translate
When I use this API:
const res = await translate('Card game', { from: 'en', to: 'nl', autoCorrect: true, requestFunction: fetch});
console.log(res.from.language.didYouMean);
console.log(res.from.language.iso);
It prints:
true
en
Although res.from.language.iso changed correctly to "en", res.from.language.didYouMean is still true.
This is incorrect ❌
Will investigate when I get the chance