Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom defaultLocale like en instead of en_US? #23

Closed
fritx opened this issue Nov 29, 2016 · 2 comments
Closed

Custom defaultLocale like en instead of en_US? #23

fritx opened this issue Nov 29, 2016 · 2 comments

Comments

@fritx
Copy link

fritx commented Nov 29, 2016

https://github.com/sindresorhus/os-locale/blob/master/index.js#L7

const defaultLocale = 'en_US';

Could we provide a custom defaultLocale like en?

Motivations:

navigator.languages
// ["en", "zh-CN", "zh", "zh-TW", "ja"]
$ ls 0.18.8-sdk/osx64/nwjs.app/Contents/Resources/ | grep en
> document.icns
en.lproj
en_GB.lproj
@sindresorhus
Copy link
Owner

en_US is the default fallback since that's what $ locale returns on US systems. Say we provided such option, it would still not match en for anyone on a US system, only when the locale can't be detected.

You listed your motivations as examples, but not what problem you're actually trying to solve. These things use different locale identifiers.

@fritx
Copy link
Author

fritx commented Nov 29, 2016

Anyway thanks for your reply ;)

Btw, I've found that PATH of wmic is missing in one of my colleagues's Windows machine.
And I guess I have some solution though.

nwutils/nw-builder#357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants