summaryrefslogtreecommitdiff
path: root/www/js/i18n.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/i18n.js')
-rw-r--r--www/js/i18n.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/www/js/i18n.js b/www/js/i18n.js
index 764a0dd..427d9b3 100644
--- a/www/js/i18n.js
+++ b/www/js/i18n.js
@@ -1,2 +1,15 @@
+"use strict";
html5ks.i18n = {
-
+ init: function () {
+ html5ks.fetch("json", "ui-strings").then(function () {
+ var uiStrings = html5ks.data["ui-strings"];
+ for (var k in uiStrings) {
+ var e = document.getElementsByClassName(k);
+ for (var i = e.length - 1; i >= 0; i--) {
+ var t = document.createTextNode(uiStrings[k]);
+ e[i].appendChild(t);
+ }
+ }
+ });
+ }
+};