diff options
author | 0neGal <mail@0negal.com> | 2021-12-29 00:39:52 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2021-12-29 00:39:52 +0100 |
commit | aefef2040280ae9e4292c39df65f2b378128aa07 (patch) | |
tree | 61dacc098255a7d102236bbd4d13b952fa91e573 /src/utils.js | |
parent | 8b90dc59f005ccb394f3392a80dcc28cc0ac73e7 (diff) | |
download | Viper-aefef2040280ae9e4292c39df65f2b378128aa07.tar.gz Viper-aefef2040280ae9e4292c39df65f2b378128aa07.zip |
uses navigator.language to determine language
Diffstat (limited to 'src/utils.js')
-rw-r--r-- | src/utils.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/utils.js b/src/utils.js index 85ce5ce..ec15554 100644 --- a/src/utils.js +++ b/src/utils.js @@ -16,6 +16,7 @@ process.chdir(app.getPath("appData")); var settings = { gamepath: "", + lang: "en-US", zip: "/northstar.zip", excludes: [ "ns_startup_args.txt", @@ -30,7 +31,6 @@ if (fs.existsSync("viper.json")) { console.log("Game path is not set! Please select the path."); } - function setpath(win) { if (! win) { settings.gamepath = cli.param("setpath"); @@ -110,4 +110,8 @@ module.exports = { update, setpath, settings, + setlang: (lang) => { + settings.lang = lang; + saveSettings(); + }, } |