Skip to content
Sebastian Lasse edited this page Sep 6, 2015 · 4 revisions

we can detect 780 languages now

for usage see test_i18n.js in /_dev !

  • specify languages you want to detect (defaults to 30 most spoken plus a few selected)
  • loads according modules at runtime async ...
  • returns best language or as many as you want, e.g.
[ { id: 'eng', name: 'UK English', score: 1.0197278641335634 },
  { id: 'spa', name: 'Spanish', score: 0.5606808290155437 },
  { id: 'cmn',
    name: 'Chinese, Mandarin (Simplified)',
    score: 0.08094245826137005 } ]

Clone this wiki locally