bing-translate-api icon indicating copy to clipboard operation
bing-translate-api copied to clipboard

source language NL not recognized

Open dmzoneill opened this issue 3 years ago • 2 comments

It translates from English to other languages fine. But it doesn't seem to want to translate from Dutch to English?

It seems to ignore that i'm using dutch and chooses German instead, either way i don't get English.

I'm using https://www.npmjs.com/package/bing-translate-api

code

      console.log(msg);
      console.log(source_lang);
      console.log(target_lang);

      translate(msg, source_lang, target_lang, true, true).then(res => {
        console.log(res);
      }).catch(err => {
        console.error(err);
      });

result

was sold ichor sagen
nl
en

{
  text: 'was sold ichor sagen',
  userLang: 'nl',
  translation: 'was sold ichor sagen',
  language: { from: 'de', to: 'en', score: 1 },
  correctedText: 'was soll ich sagen',
  raw: [ { translations: [Array], detectedLanguage: [Object] } ]
}

dmzoneill avatar Sep 20 '22 17:09 dmzoneill

works fine from PT -> EN

something going on with NL

dmzoneill avatar Sep 20 '22 18:09 dmzoneill

I'm not sure but it seems 'was sold ichor sagen' is not nl but de?

plainheart avatar Sep 21 '22 06:09 plainheart