Add language setter

This commit is contained in:
Maroxy 2021-10-23 01:53:20 +02:00
parent 1670d7eabd
commit 4b1a75ce33

View file

@ -1,4 +1,5 @@
const { app, BrowserWindow, ipcMain, Notification, shell } = require('electron');
const { Genshinlib } = require('./public/js/Genshinlib');
const path = require('path');
let mainWindow;
@ -60,6 +61,12 @@ function createWindow ()
// mainWindow.webContents.openDevTools();
}
// Set language on start
if(Genshinlib.getConfig().lang.launcher)
app.commandLine.appendSwitch('lang', Genshinlib.getConfig().lang.launcher);
else
app.commandLine.appendSwitch('lang', 'en-us');
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.