How to detect language of an array item using javascript?
<p>How to detect language of an array item using <code>javascript</code>?
using plain <code>js</code> or any <code>jquery</code>/<code>js</code> libraries or any online api/sdk</p>

<pre><code>let voice = 'US English Female';
const lang = detectlanguagesomehow(array.item);
switch (lang) {
  case 'en':
    voice = "US English Female";
    break;
  case 'ar':
    voice = "Arabic Female";
    break;
  default:
    voice = "US English Female";
    break;
}
</code></pre>