From 95f5ce13bafb35b1aa426be9041d8b6ede6c281c Mon Sep 17 00:00:00 2001 From: Cutls Date: Wed, 7 Aug 2019 23:14:20 +0900 Subject: [PATCH] Add: detecting languages[de/cs/bg] --- app/main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/main.js b/app/main.js index 1019f5aa..8f7c097a 100644 --- a/app/main.js +++ b/app/main.js @@ -94,13 +94,19 @@ app.on('activate', function () { }); function createWindow() { - if (isFile(lang_path)) {1 + if (isFile(lang_path)) { var lang = fs.readFileSync(lang_path, 'utf8'); } else { var langs = app.getLocale(); console.log(langs); if (~langs.indexOf("ja")) { lang = "ja"; + } else if (~langs.indexOf("de")) { + lang = "de"; + } else if (~langs.indexOf("cs")) { + lang = "cs"; + } else if (~langs.indexOf("bg")) { + lang = "bg"; } else { lang = "en"; }