1 # os-locale [![Build Status](https://travis-ci.org/sindresorhus/os-locale.svg?branch=master)](https://travis-ci.org/sindresorhus/os-locale)
3 > Get the system [locale](https://en.wikipedia.org/wiki/Locale_(computer_software))
5 Useful for localizing your module or app.
7 POSIX systems: The returned locale refers to the [`LC_MESSAGE`](http://www.gnu.org/software/libc/manual/html_node/Locale-Categories.html#Locale-Categories) category, suitable for selecting the language used in the user interface for message translation.
13 <a href="https://tidelift.com/subscription/pkg/npm-os-locale?utm_source=npm-os-locale&utm_medium=referral&utm_campaign=readme">Get professional support for 'os-locale' with a Tidelift subscription</a>
17 Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
26 $ npm install os-locale
33 const osLocale = require('os-locale');
36 console.log(await osLocale());
44 ### osLocale([options])
46 Returns a `Promise` for the locale.
48 ### osLocale.sync([options])
61 Set to `false` to avoid spawning subprocesses and instead only resolve the locale from environment variables.
66 To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
71 MIT © [Sindre Sorhus](https://sindresorhus.com)