about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/main.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/scripts/main.js b/scripts/main.js
index 632925d..afcda7b 100644
--- a/scripts/main.js
+++ b/scripts/main.js
@@ -2,13 +2,7 @@
 	'use strict';
 
 	var initialized = false;
-
-	// load i18n and perform translation
-	var i18n = new I18nText({path: 'lang'});
-	i18n.once(I18nText.EVT_LOCALE_CHANGE, function (data) {
-		translate_ui();
-	});
-	i18n.setLocale('en');
+	var i18n;
 
 	// i18n key prefix for MUC ("muc.") or 1:1 chat ("chat.")
 	var key_prefix;
@@ -86,6 +80,13 @@
 		if (initialized) return;
 		initialized = true;
 
+		// load i18n and perform translation
+		i18n = new I18nText({path: 'lang'});
+		i18n.once(I18nText.EVT_LOCALE_CHANGE, function (data) {
+			translate_ui();
+		});
+		i18n.setLocale('en');
+
 		// functionality
 		load_clients();
 		rehash();