Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.0 KiB

  1. # os-locale [![Build Status](https://travis-ci.org/sindresorhus/os-locale.svg?branch=master)](https://travis-ci.org/sindresorhus/os-locale)
  2. > Get the system [locale](https://en.wikipedia.org/wiki/Locale_(computer_software))
  3. Useful for localizing your module or app.
  4. 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.
  5. ## Install
  6. ```
  7. $ npm install os-locale
  8. ```
  9. ## Usage
  10. ```js
  11. const osLocale = require('os-locale');
  12. (async () => {
  13. console.log(await osLocale());
  14. //=> 'en_US'
  15. })();
  16. ```
  17. ## API
  18. ### osLocale([options])
  19. Returns a `Promise` for the locale.
  20. ### osLocale.sync([options])
  21. Returns the locale.
  22. #### options
  23. Type: `Object`
  24. ##### spawn
  25. Type: `boolean`<br>
  26. Default: `true`
  27. Set to `false` to avoid spawning subprocesses and instead only resolve the locale from environment variables.
  28. ## License
  29. MIT © [Sindre Sorhus](https://sindresorhus.com)