]> git.proxmox.com Git - mirror_novnc.git/blobdiff - app/ui.js
Use gettext .po files for translations
[mirror_novnc.git] / app / ui.js
index 93e43fde1bf1e6f0e557aa0b3720f69b113d1bc7..f1e636519b25962ac30d1f459398da19527d76ba 100644 (file)
--- a/app/ui.js
+++ b/app/ui.js
@@ -40,13 +40,20 @@ var UI;
         return false;
     });
 
+    // Set up translations
+    var LINGUAS = ["de", "el", "nl", "sv"];
+    Util.Localisation.setup(LINGUAS);
+    if (Util.Localisation.language !== "en") {
+        WebUtil.load_scripts(
+            {'app': ["locale/" + Util.Localisation.language + ".js"]});
+    }
+
     /* [begin skip-as-module] */
     // Load supporting scripts
     WebUtil.load_scripts(
-        {'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"]});
+        {'core': ["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] */