extended-language-list
v0.2.2
Published
Map Stores ISO 639-1 language codes to language names and vice versa (multilang version).
Downloads
225
Readme
@forked from pandeysoni
extended-language-list
Map Stores ISO 639-1 language codes to language names and vice versa.
Supported languages:
en
ar
ml
hi
tl
ur
example
var languages = require('extended-language-list')();
console.log(languages.getLanguageName('bh', 'en')); // Bihari
console.log(languages.getLanguageCode('Bihari', 'en')); // bh
methods
Usage:
var languages = require('extended-language-list')();
All input is case-insensitive.
getLanguageName(languageCode, requiredLanguage)
Expects a language code, and the desired language.
Returns the language name for that language code in the desired language.
If not found, it returns undefined
.
getLanguageCode(languageName, requiredLanguage)
Expects the language name, and the desired language.
Returns the language code for that language in the desired language.
If not found, it returns undefined
.
getLanguageNames(requiredLanguage)
Returns an array of all language names in the desired language.
getLanguageCodes(requiredLanguage)
Returns an array of all language codes in the desired language.
getData(requiredLanguage)
Returns an array of all language information in the desired language, in the same format as it gets imported.
install
npm install extended-language-list
license
BSD