diff options
author | 0neGal <mail@0negal.com> | 2021-12-29 00:52:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-29 00:52:20 +0100 |
commit | efdc25e4516bc5341e305acf42935407f465a0fb (patch) | |
tree | 5b0eeb6c16d8d419e9dc680136918938cee3aff6 /src/app/main.js | |
parent | 3d5ccdad4b95e4453ac1857324b2a89497870f09 (diff) | |
parent | 4add9f34f5d9cded91db553aa7a72c6898f7d98b (diff) | |
download | Viper-efdc25e4516bc5341e305acf42935407f465a0fb.tar.gz Viper-efdc25e4516bc5341e305acf42935407f465a0fb.zip |
Merge pull request #7 from 0neGal/localization
Localization support
Diffstat (limited to 'src/app/main.js')
-rw-r--r-- | src/app/main.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/app/main.js b/src/app/main.js index d390962..579f785 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -2,20 +2,25 @@ const fs = require("fs"); const path = require("path"); const { ipcRenderer } = require("electron"); +const lang = require("../lang"); + var settings = { gamepath: "", zip: "/northstar.zip", + lang: navigator.language, excludes: [ "ns_startup_args.txt", "ns_startup_args_dedi.txt" ] } +ipcRenderer.send("setlang", settings.lang); + if (fs.existsSync("viper.json")) { settings = {...settings, ...JSON.parse(fs.readFileSync("viper.json", "utf8"))}; settings.zip = path.join(settings.gamepath + "/northstar.zip"); } else { - alert("Game path is not set! Please select the path!"); + alert(lang("gui.missinggamepath")); setpath(); } |