electron/spec/fixtures/api/locale-check/main.js

12 lines
241 B
JavaScript
Raw Normal View History

2020-03-20 20:28:31 +00:00
const { app } = require('electron');
const locale = process.argv[2].substr(11);
app.commandLine.appendSwitch('lang', locale);
app.whenReady().then(() => {
2020-03-20 20:28:31 +00:00
process.stdout.write(app.getLocale());
process.stdout.end();
2020-03-20 20:28:31 +00:00
app.quit();
});