0.0.1 • Published 11 years ago
decanat-get-locale v0.0.1
get-locale 
Detect language preference of a page or an element.
Installation
Install with component:
$ component install decanat/get-localeInstall with npm for browserify:
$ npm install decanat-get-localeUsage
To get preferred language getLocale checks following sources (in order):
- HTML
langattribute - Cookies
navigator.language- Default, specified in config
var getLocale = require('get-locale');
getLocale(); // 'en-US'Testing
To test with PhantomJS, run:
$ make test License
The MIT License
0.0.1
11 years ago