aboutsummaryrefslogtreecommitdiff
path: root/src/utils.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2021-12-29 00:52:20 +0100
committerGitHub <noreply@github.com>2021-12-29 00:52:20 +0100
commitefdc25e4516bc5341e305acf42935407f465a0fb (patch)
tree5b0eeb6c16d8d419e9dc680136918938cee3aff6 /src/utils.js
parent3d5ccdad4b95e4453ac1857324b2a89497870f09 (diff)
parent4add9f34f5d9cded91db553aa7a72c6898f7d98b (diff)
downloadViper-efdc25e4516bc5341e305acf42935407f465a0fb.tar.gz
Viper-efdc25e4516bc5341e305acf42935407f465a0fb.zip
Merge pull request #7 from 0neGal/localization
Localization support
Diffstat (limited to 'src/utils.js')
-rw-r--r--src/utils.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/utils.js b/src/utils.js
index 9839c4c..ce927b8 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");
@@ -141,4 +141,8 @@ module.exports = {
update,
setpath,
settings,
+ setlang: (lang) => {
+ settings.lang = lang;
+ saveSettings();
+ },
}