aboutsummaryrefslogtreecommitdiff
path: root/src/lang.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lang.js')
-rw-r--r--src/lang.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lang.js b/src/lang.js
index 266fb8b..d404e8e 100644
--- a/src/lang.js
+++ b/src/lang.js
@@ -1,6 +1,7 @@
const fs = require("fs");
var lang = "en";
+var langDef = JSON.parse(fs.readFileSync(__dirname + `/lang/en.json`, "utf8"));
if (fs.existsSync("viper.json")) {
lang = JSON.parse(fs.readFileSync("viper.json", "utf8")).lang;
if (! lang) {lang = "en"}
@@ -19,6 +20,10 @@ module.exports = (string) => {
if (langObj[string]) {
return langObj[string];
} else {
- return string
+ if (langDef[string]) {
+ return langDef[string];
+ } else {
+ return string;
+ }
}
}