node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org ยป

derby-locale-browser

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.