0.2.2 • Published 9 years ago

derby-locale-browser v0.2.2

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

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.