0.2.2 • Published 3 years ago

extended-language-list v0.2.2

Weekly downloads
-
License
BSD
Repository
github
Last release
3 years ago

@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

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago