in python with getdefaultlocale I can get the locale
>>> import locale
>>> locale.getdefaultlocale()
('es_ES', 'UTF-8')
in nodejs exists some similar?
Unfortunately, it's not as straightforward as it seems. The docs tells the whole story. There's also os-locale that it might be helpful.
But if you happen to be running a simulated browser environment, you can try this:
console.log('navigator.language:', navigator.language);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With