lang-codes
v1.0.0
Published
Easily searchable ISO 639-1/2/3 Language codes
Downloads
1,968
Maintainers
Readme
lang-codes
Easily searchable ISO 639-1/2/3 Language codes
Table of Contents
About
Easily searchable ISO 639-1/2/3 language codes with English and local names (under 6kB gzipped). Data extracted from nodejs-langs.
Install
This project uses node and npm.
$ npm install lang-codes
$ # OR
$ yarn add lang-codes
Usage
import find from 'lang-codes'
find('afr') // { 'name': 'Afrikaans', 'local': 'Afrikaans', '1': 'af', '2': 'afr', '2T': 'afr', '2B': 'afr', '3': 'afr' }
find(/af/) // [ { '1': 'aa', '2': 'aar', '3': 'aar', name: 'Afar', local: 'Afaraf', '2T': 'aar', '2B': 'aar' }, { '1': 'af', '2': 'afr', '3': 'afr', name: 'Afrikaans', local: 'Afrikaans', '2T': 'afr', '2B': 'afr' } ]
find('zul', { props: 'name' }) // Zulu
Contribute
- Fork it and create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request
License
MIT