JSPM

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

Get the system locale

Package Exports

  • os-locale

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 (os-locale) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

os-locale Build Status

Get the system locale

Useful for localizing your module or app.

Install

$ npm install --save os-locale

Usage

var osLocale = require('os-locale');

osLocale(function (err, locale) {
    console.log(locale);
    //=> 'en_US'
});

API

osLocale([options], callback(error, locale))

osLocale.sync([options])

Returns the locale.

options.spawn

Type: boolean
Default: true

Set to false to avoid spawning subprocesses and instead only resolve the locale from environment variables.

License

MIT © Sindre Sorhus