JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14994
  • Score
    100M100P100Q131219F
  • License MIT

Try as hard as possible to get that browser locale.

Package Exports

  • locale2

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (locale2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

locale2 Version License Downloads Deps DevDeps

Try as hard as possible to get that browser locale like en-US.

Notes

I intentionally made the code look like an OCD's dream because code is poetry so I got all artsy with it. I also smoked A LOT.

Contribute

I'd love to grow this project with some more l10n, i18n pizzaz.

Use

var locale2 = require('locale2');
> locale2
en-US
>

It also pairs well with iso3166-1!

var iso3166 = require('iso3166-1');
var locale2 = require('locale2');
> iso3166.from(locale2).to3()
USA
>

Try it!

view on requirebin

If we can't detect your locale, then we'll give you your money back! it's win-win!