0.0.3 • Published 10 years ago

rind-locale v0.0.3

Weekly downloads
10
License
MIT
Repository
github
Last release
10 years ago

rind-locale npm.io

Find a locale match for a string of locale(s) in an array of supported locales

Usage

var locale = require('..')({
  // first locale is also the final fallback default
  locales: ['de', 'en-US', 'ja', 'kr', 'zh-TW']
})

console.log(locale('ja'));      // ja
console.log(locale('ja,en'));   // ja
console.log(locale('en-UK'));   // en-US
console.log(locale('klingon')); // de