Skip to content

timse/browserlocale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

retrieve browser locale from navigator object

Resources

Stars

Watchers

Forks

Packages

No packages published