DeepLcom / deepl-node

Official Node.js library for the DeepL language translation API.
MIT License
370 stars 22 forks source link

Wrong detection of source language #22

Closed CentralMatthew closed 1 year ago

CentralMatthew commented 1 year ago

I need to detect source language of word "Insomnia". When i use deepl-node package, i got source language Slovak(sk). When i use Deepl on site translator i got, when i typed "Insomnia", English language detection.

danielchinyj commented 1 year ago

Hi, I also have this issue. Tried "Hello" with deepl-node package and got source language NB - Norwegian (Bokmål). When use on site translator it returned English language detection.

Any help on this?

JanEbbing commented 1 year ago

Hi, the browser has more information than the API to infer the correct source language, and as a result the API needs a few words (not just 1) to detect the language reliably. If at all possible, please set the source language when translating single words or very short phrases, or provide a longer sentence to translate. Please let me know if this is not possible - we are always looking to improve our translations.