0.1.1 • Published 9 years ago

browserlocale v0.1.1

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

Browserlocale

retrieves locale from current navigator object

how do i use it?

As browserlocale is UMD you can either require it or load it directly into your browser

require/import

import browserlocale from 'browserlocale';

browserlocale();
// => "en-us" or whatever locale there currently is

global in browser

<script src="some/path/to/browserlocale.js"></script>
<script>
browserlocale();
// => "en-us" or whatever locale there currently is
</script>