node-country-list
translate country Alpha-2 code to country name in 100+ languages
setup
npm install node-country-list
example
const Countries = ; // Countries.get(alpha2Code: string, langCode: string): stringCountries; // Vereinigte StaatenCountries; // 法国Countries; // 美国Countries; // 美國Countries; // undefined
please note
- library is using lazy loading for language data to safe on startup and overall memory footprint
- it is nodejs library -
fs
andpath
are required
supported language codes
- af
- ak
- am
- ar
- as
- az
- be
- bg
- bm
- bn
- bo
- br
- bs
- ca
- ce
- cs
- cy
- da
- de
- dz
- ee
- el
- en
- eo
- es
- et
- eu
- fa
- ff
- fi
- fo
- fr
- fy
- ga
- gd
- gl
- gu
- gv
- ha
- he
- hi
- hr
- hu
- hy
- id
- ig
- ii
- is
- it
- ja
- ka
- ki
- kk
- kl
- km
- kn
- ko
- ks
- kw
- ky
- lb
- lg
- ln
- lo
- lt
- lu
- lv
- mg
- mk
- ml
- mn
- mr
- ms
- mt
- my
- nb
- nd
- ne
- nl
- nn
- no
- om
- or
- os
- pa
- pl
- ps
- pt
- qu
- rm
- rn
- ro
- ru
- rw
- se
- sg
- sh
- si
- sk
- sl
- sn
- so
- sq
- sr
- sv
- sw
- ta
- te
- th
- ti
- tl
- to
- tr
- ug
- uk
- ur
- uz
- vi
- yi
- yo
- zh
- zh-hans
- zh-hant
- zu
sources
- country-list datafiles
- wikipedia verification
- cia world factbook verification