machine-locale
v2.0.0
Published
get os's default locale
Downloads
2
Readme
machine-locale
Get OS's default locale language code.
The returned locale language code is normalized to the format "ll-cc":
- all lower cases
- _ is replaced with -
- ll is language code, cc is country code
Install
npm install machine-locale
Example
require("machine-locale")(function(err, locale) {
console.log(locale)
})
Caveat
In windows, first run will take quite a while, due to the slowness of "systeminfo" command.