Electron on en-GB Windows sets navigator.language to en-US


I’m running node 6.9.4 on Windows 7 in a Virtualbox VM. My Windows location, locale and keyboard are all set to UK, but I can see in the Javascript console of an electron app that navigator.language is set to “en-US” (not “en-GB”). Why could this be? How can I debug it?

I’ve tested this with the electron-quick-start app, by cloning the repo and doing npm install ; npm start.



I guessing it’s Chromium’s default language. Whenever I install Firefox or Chromium/Chrome the browser settings are always en-US and I have to update it in preferences.

Perhaps there’s a way you could update it in Electron’s APIs. If you can’t do this and it pertains to web requests then you may be able to intercept outgoing HTTP requests and edit the language header before it is sent.

For my app I looked in the folder where Electron’s Chromium stores its data and there is a Preferences file but it seems to be drastically reduced compared to a normal browser install, as it only contains settings relating to the Dev Tools window when I last used it.


Thanks. I’ve looked into it a bit more. It seems like on Windows Electron/Chromium sets navigator.language based on the OS’s display language. And in Windows 7 you cannot set the display language to British English or American English; there is just one option: English.