2020-03-20 20:28:31 +00:00
|
|
|
const { app } = require('electron');
|
2018-02-08 14:26:37 +00:00
|
|
|
|
2020-10-28 16:18:47 +00:00
|
|
|
const locale = process.argv[2].substr(11);
|
2020-11-18 02:13:01 +00:00
|
|
|
if (locale.length !== 0) {
|
|
|
|
app.commandLine.appendSwitch('lang', locale);
|
|
|
|
}
|
2020-10-28 16:18:47 +00:00
|
|
|
|
2020-02-03 22:43:22 +00:00
|
|
|
app.whenReady().then(() => {
|
2020-11-18 02:13:01 +00:00
|
|
|
if (process.argv[3] === '--print-env') {
|
|
|
|
process.stdout.write(String(process.env.LC_ALL));
|
|
|
|
} else {
|
|
|
|
process.stdout.write(app.getLocale());
|
|
|
|
}
|
2020-03-20 20:28:31 +00:00
|
|
|
process.stdout.end();
|
2018-02-08 14:26:37 +00:00
|
|
|
|
2020-03-20 20:28:31 +00:00
|
|
|
app.quit();
|
|
|
|
});
|