Map Stores ISO 639-1 language codes to language names and vice versa.
var languages = require('language-list')();
console.log(languages.getLanguageName('bh')); // Bihari
console.log(languages.getLanguageCode('Bihari')); // bh
Usage:
var languages = require('language-list')();
All input is case-insensitive.
Expects the language code.
Returns the language name for that language code.
If not found, it returns undefined
.
Expects the language name.
Returns the language code for that language.
If not found, it returns undefined
.
Returns an array of all language names.
Returns an array of all language codes.
Returns an array of all language information, in the same format as it gets imported.
npm install language-list
BSD