Skip to content

Commit

Permalink
Fixed popups opening in the wrong language if language was detected a…
Browse files Browse the repository at this point in the history
…utomatically
  • Loading branch information
PakL committed Oct 27, 2019
1 parent 816301e commit f912275
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion res/botview_global.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ function setJSON(name, value) {
}


let lang = getString('language', 'en')
let locale = app.getLocale().toLowerCase()
if(['en', 'de'].indexOf(locale) < 0) locale = 'en'
let lang = getString('language', locale)
let i18n = new i18n_mod(lang, document.location.pathname.substr(1, document.location.pathname.lastIndexOf('/')) + '../language.json')

window.addEventListener('load', () => {
Expand Down

0 comments on commit f912275

Please sign in to comment.