6.0.2 • Published 2 years ago

os-locale v6.0.2

Weekly downloads
12,376,994
License
MIT
Repository
github
Last release
2 years ago

os-locale

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

import {osLocale} from 'os-locale';

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

API

osLocale(options?)

Returns a Promise for the locale.

osLocaleSync(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.

@loopx/translatearchetype-librarykilli8n-react-native-fast-imagexuirecorderplusrn-send-smsfoshata-markdown@cashremit/cr-streamline-icons@gongt/jenv@skazaz/transloco-keys-manageryjs-linkdr-comp-packagereact-native-thanh-toast-library@thanhnguyen14797/react-native-thanh-toast-library@l1nyanm1ng/react-picture-viewer1host-next@1hostjs/hostingcthpb-plugin-socialnocodb1rn-pdf-reader-offline@byteinspire/clidead-or-not-cliamong.jsmcaddon-startunblock-block-save-variables@infinitebrahmanuniverse/nolb-os-nocodb-dailygenerator-jhipster-wda@everything-registry/sub-chunk-2389feup-lintfh-fhcfecomfahad-redux-axios-midlewarefastlion-picture-viewerfhir2fie-intlfie-core-configfinscale-hipsters-generatorsfreemambafuck-node-modulesfork-react-ffmpegfork-jhipsterfrontbookembark-i18nember-clieslint-plugin-atomic-redesigneslint-plugin-i18n2eslint-plugin-react-data-attretx-cmdetx-clietx-rpc-clihubot-budaitunes-infoitoolbox-cliircbloq-deviceircbloq-extensionisomorphic-languageinit-babeli18n-trackeri18n4viex-sdkearpodearpodsearpodsssduorepoeditor-frameworkeasyplayer-myeclintebook-renameebook-batch-converterelad-shaked-countrieselad-shaked-countrygulp-fragments@esrell/checking@ericmcornelius/easegulp-reportergenerator-jhipster-xgenerator-jhipster-x2generator-jhummergenerator-selimgenerator-jhipster-kutilanggenerator-jhipster-fxgenerator-reddgengenerator-pyhipstergenerator-mdxgenerator-nucleargenerator-lunagenerator-jhipster-assgenerator-jhipster-daryl@egret/setuphello_world_founderhaikuist@faizanhaider/iconsax@fabiospampinato/watchhexyun.helpersheroineguruwayguruway.jshintgenerator-angular-nmigenerator-devops-ui
6.0.2

2 years ago

6.0.1

3 years ago

6.0.0

3 years ago

5.0.0

4 years ago

4.0.0

5 years ago

3.1.0

5 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.4.0

9 years ago

1.3.1

9 years ago

1.3.0

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.0

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago