nw.js
nw.js copied to clipboard
NWJS doesn't report correct locale.
NWJS Version : v0.61.0 Operating System : Windows 10.
Expected behavior
Set "Windows display language" to "English (United States)" and "Regional format" to "Chinese (Simplified, China)", NWJS should report the locale to be 'zh-CN', like node does.
Actual behavior
- Console output from NWJS Intl.DateTimeFormat().resolvedOptions().locale 'en-US'
- Output from node:
Intl.DateTimeFormat().resolvedOptions().locale 'zh-CN'
Thanks for reporting. What does Chromium/Chrome report in your system?
Chrome reports according to its own settings:
chrome://settings/languages
It seems the same is true for keyboard locales. It might be that the Keyboard API reports back based on the users system language, but not the keyboard language. This means when someone is using a en-US OS language, but a German keyboard layout (i.e. QWRETZ) the labels are all wrong when fetching from the layout map.
Is there a way to line argument nw.js to load a specific locale?
(All on windows btw)