nodejs-langs icon indicating copy to clipboard operation
nodejs-langs copied to clipboard

Missing many languages

Open garyking opened this issue 7 years ago • 5 comments
trafficstars

Many languages seem to be missing from this library. For instance, cmn for the ISO 639-C version of Mandarin Chinese is missing. langs.has('3', 'cmn') does not work.

garyking avatar May 20 '18 06:05 garyking

I have the same problem. Most of the languages I've tried (languages that are not in list 1) are not recognized.

ChallengeSoft avatar Feb 25 '19 13:02 ChallengeSoft

Here is a complete list of language https://iso639-3.sil.org/code_tables/639/data

mohsen1 avatar Apr 08 '19 22:04 mohsen1

Same here...I guess the repo is unmaintained :( langs.has('3', 'arb') returns false as well

AlmogCohen avatar Aug 12 '19 00:08 AlmogCohen

I've found a solution to the missing 639-3 codes missing from the library by combining it with another one - iso-639-3-to-1. Seems like most of the issue with this package is the missing support for 3 letter codes.

  1. Install the other package: npm install --save iso-639-3-to-1
  2. In your code:
const convert3To1 = require('iso-639-3-to-1')
langs.where("1", convert3To1(threeLetterCodecode)

That will work both for cmn and arb that were not working while using the lang.where('3', code). Seemed to work for all the languages I needed. Good luck!

AlmogCohen avatar Aug 12 '19 00:08 AlmogCohen

There are thousands languages in the world. Why not to use SIL standard? I miss Samogitian language (sgs)

zordsdavini avatar Oct 28 '23 21:10 zordsdavini