Native language names for all ISO-639-1 codes plus some common IETF BCP 47 language tags
npm install iso-639-1-plus[travis-image]: https://travis-ci.org/polarisation/iso-639-1-plus.svg?branch=master
[travis-url]: https://travis-ci.org/polarisation/iso-639-1-plus
[npm-image]: https://img.shields.io/npm/v/iso-639-1-plus.svg?style=flat-square
[npm-url]: https://npmjs.org/package/iso-639-1-plus
[download-url]: https://img.shields.io/npm/dt/iso-639-1-plus.svg?style=flat-square
Simple interface for ISO-639-1 2-letter language codes and common IETF BCP 47 language tags.
Forked from iso-639-1 and extended with a some common language subtags for regional variations (eg. en-GB, pt-BR, zh-Hans). The intention is not to provide a definitive list, but a subset of commonly used language tags / locales.
```
npm install iso-639-1-plus
`javascript`
const ISO6391 = require('iso-639-1-plus');
console.log(ISO6391.getName('en-GB')); // 'English (UK)'
`javascript`
import ISO6391 from 'iso-639-1-plus';
console.log(ISO6391.getName('en-GB')); // 'English (UK)'
HTML
`html`
Visit global variable ISO6391 in js
`javascript`
console.log(ISO6391.getName('en-GB')); // 'English (UK)'
Lookup language English name by code
Get array of all language English names
Lookup language native name by code
Get array of all language native names
Lookup code by English name or native name
Get array of all codes
Check whether the given code is in the list of ISO-639-1
Get the array of the language objects by the given codes
`
const ISO6391 = require('iso-639-1-plus')
console.log(ISO6391.getName('zh')) // 'Chinese'
console.log(ISO6391.getNativeName('zh')) // '中文'
console.log(ISO6391.getAllNames()) // ['Afar','Abkhaz', ... ,'Zulu']
console.log(ISO6391.getAllNativeNames()) //['Afaraf','аҧсуа бызшәа', ... ,'isiZulu' ]
console.log(ISO6391.getCode('Chinese')) // 'zh'
console.log(ISO6391.getCode('中文')) // 'zh'
console.log(ISO6391.getAllCodes()) //['aa','ab',...,'zu']
console.log(ISO6391.validate('en')) // true
console.log(ISO6391.validate('xx')) // false
console.log(ISO6391.getLanguages(['en', 'zh']))
// [{code:'en',name:'English',nativeName:'English'},{code:'zh',name:'Chinese',nativeName:'中文'}]
``