diff --git a/app/ui.js b/app/ui.js index 3e78c259..b609bd45 100644 --- a/app/ui.js +++ b/app/ui.js @@ -27,9 +27,10 @@ var UI; /* [begin skip-as-module] */ // Load supporting scripts WebUtil.load_scripts( - {'core': [Util.Localisation.getLanguageFileLocation(), "base64.js", "websock.js", "des.js", "input/keysymdef.js", - "input/xtscancodes.js", "input/util.js", "input/devices.js", - "display.js", "inflator.js", "rfb.js", "input/keysym.js"]}); + {'core': [WebUtil.getLanguageFileLocation(), "base64.js", "websock.js", + "des.js", "input/keysymdef.js", "input/xtscancodes.js", + "input/util.js", "input/devices.js", "display.js", + "inflator.js", "rfb.js", "input/keysym.js"]}); window.onscriptsload = function () { UI.load(); }; /* [end skip-as-module] */ diff --git a/app/webutil.js b/app/webutil.js index 38bb3967..ceacd953 100644 --- a/app/webutil.js +++ b/app/webutil.js @@ -371,6 +371,12 @@ WebUtil.releaseCapture = function () { } }; + +// Get language file location +WebUtil.getLanguageFileLocation = function () { + return '../app/locale/locale-'+Util.Localisation.getLanguageCode()+'.js'; +}; + // Dynamically load scripts without using document.write() // Reference: http://unixpapa.com/js/dyna.html // diff --git a/core/util.js b/core/util.js index 42db1d10..c7932795 100644 --- a/core/util.js +++ b/core/util.js @@ -385,11 +385,6 @@ Util.Localisation = { 'de-DE': 'de-DE' }, - // Get language file location - getLanguageFileLocation: function () { - return '../app/locale/locale-'+Util.Localisation.getLanguageCode()+'.js'; - }, - // Get language code from browser and verify it getLanguageCode: function () { var languageCode = Util.Localisation.getUserPreferredLanguage();