nodejs-langs
nodejs-langs copied to clipboard
Missing many languages
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.
I have the same problem. Most of the languages I've tried (languages that are not in list 1) are not recognized.
Here is a complete list of language https://iso639-3.sil.org/code_tables/639/data
Same here...I guess the repo is unmaintained :( langs.has('3', 'arb') returns false as well
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.
- Install the other package:
npm install --save iso-639-3-to-1 - 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!
There are thousands languages in the world. Why not to use SIL standard? I miss Samogitian language (sgs)