Skip to content

sdonafets/language-list

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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

About

Map Stores ISO 639-1 language codes to language names and vice versa.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%