fix: set app locale after user's script is loaded (#26185)

* fix: set app locale after user's script is loaded

* fix: set LC_ALL env on Linux
This commit is contained in:
Cheng Zhao
2020-10-29 01:18:47 +09:00
committed by GitHub
parent 0c2e2bca92
commit d3f32c7502
5 changed files with 40 additions and 55 deletions

View File

@@ -1,5 +1,8 @@
const { app } = require('electron');
const locale = process.argv[2].substr(11);
app.commandLine.appendSwitch('lang', locale);
app.whenReady().then(() => {
process.stdout.write(app.getLocale());
process.stdout.end();