derby-locale-browser
v0.2.2
Published
Add browser support to derby-locale.
Downloads
5
Maintainers
Readme
Derby Locale Browser
A derby-locale strategy that selects locales from the browser's Accept-Language
request header.
Installation
$ npm install derby-locale-browser --save
Usage
In your server file, add the middleware before derby-locale:
var localeBrowser = require('derby-locale-browser');
expressApp
// ...
// ...
.use(localeBrowser())
.use(locale())
Options
name – The name of the strategy. Defaults to browser
.
order – The order of the strategy. Blank by default.
path – The path to the locale object. Defaults to $locale
.