mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-03-17 21:50:11 +03:00
Add language setter
This commit is contained in:
parent
1670d7eabd
commit
4b1a75ce33
1 changed files with 7 additions and 0 deletions
7
entry.js
7
entry.js
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue