os-locale

WebJar for os-locale

License

License

MIT
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

os-locale
Last Version

Last Version

2.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

os-locale
WebJar for os-locale
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/os-locale

Download os-locale

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/os-locale/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>os-locale</artifactId>
    <version>2.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/os-locale/
implementation 'org.webjars.bower:os-locale:2.1.0'
// https://jarcasting.com/artifacts/org.webjars.bower/os-locale/
implementation ("org.webjars.bower:os-locale:2.1.0")
'org.webjars.bower:os-locale:jar:2.1.0'
<dependency org="org.webjars.bower" name="os-locale" rev="2.1.0">
  <artifact name="os-locale" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='os-locale', version='2.1.0')
)
libraryDependencies += "org.webjars.bower" % "os-locale" % "2.1.0"
[org.webjars.bower/os-locale "2.1.0"]

Dependencies

compile (3)

Group / Artifact Type Version
org.webjars.bower » execa jar [0.7.0,0.8)
org.webjars.bower » lcid jar [1.0.0,2)
org.webjars.bower » mem jar [1.1.0,2)

Project Modules

There are no modules declared in this project.

os-locale Build Status

Get the system locale

Useful for localizing your module or app.

POSIX systems: The returned locale refers to the LC_MESSAGE category, suitable for selecting the language used in the user interface for message translation.

Install

$ npm install os-locale

Usage

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

(async () => {
	console.log(await osLocale());
	//=> 'en-US'
})();

API

osLocale(options?)

Returns a Promise for the locale.

osLocale.sync(options?)

Returns the locale.

options

Type: object

spawn

Type: boolean
Default: true

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

os-locale for enterprise

Available as part of the Tidelift Subscription.

The maintainers of os-locale and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.

Versions

Version
2.1.0