diff --git a/app/assets/js/langloader.js b/app/assets/js/langloader.js
index 24ab84ae..866c9da8 100644
--- a/app/assets/js/langloader.js
+++ b/app/assets/js/langloader.js
@@ -18,4 +18,8 @@ exports.query = function(id){
exports.queryJS = function(id){
return exports.query(`js.${id}`)
+}
+
+exports.queryEJS = function(id){
+ return exports.query(`ejs.${id}`)
}
\ No newline at end of file
diff --git a/app/assets/lang/en_US.json b/app/assets/lang/en_US.json
index 25b34c24..20e879ce 100644
--- a/app/assets/lang/en_US.json
+++ b/app/assets/lang/en_US.json
@@ -2,6 +2,11 @@
"html": {
"avatarOverlay": "Edit"
},
+ "ejs": {
+ "landing": {
+ "news": "NEWS"
+ }
+ },
"js": {
"login": {
"error": {
diff --git a/app/landing.ejs b/app/landing.ejs
index 7e747818..b70e484b 100644
--- a/app/landing.ejs
+++ b/app/landing.ejs
@@ -133,7 +133,7 @@
-
NEWS
+
<%- lang('landing.news') %>
diff --git a/index.js b/index.js
index 24397812..8f01ab7a 100644
--- a/index.js
+++ b/index.js
@@ -12,6 +12,10 @@ const semver = require('semver')
const { pathToFileURL } = require('url')
const { AZURE_CLIENT_ID, MSFT_OPCODE, MSFT_REPLY_TYPE, MSFT_ERROR, SHELL_OPCODE } = require('./app/assets/js/ipcconstants')
+// Setup Lang
+const LangLoader = require('./app/assets/js/langloader')
+LangLoader.loadLanguage('en_US')
+
// Setup auto updater.
function initAutoUpdater(event, data) {
@@ -237,6 +241,8 @@ function createWindow() {
remoteMain.enable(win.webContents)
ejse.data('bkid', Math.floor((Math.random() * fs.readdirSync(path.join(__dirname, 'app', 'assets', 'images', 'backgrounds')).length)))
+ ejse.data('Lang', LangLoader)
+ ejse.data('lang', LangLoader.queryEJS)
win.loadURL(pathToFileURL(path.join(__dirname, 'app', 'app.ejs')).toString())