Add browser support to derby-locale.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

Derby Locale Browser

A derby-locale strategy that selects locales from the browser's Accept-Language request header.

Build Status

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.