summaryrefslogtreecommitdiff
path: root/www/js/i18n.js
blob: 692104d848c47cc0b3bb8bcc4cede32daf6c0b05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"use strict";
html5ks.i18n = {
  init: function () {
    html5ks.fetch("json", html5ks.persistent.language === "en" ?
                          "ui-strings" : "ui-strings_FR").then(function (uiStrings) {
      for (var k in uiStrings) {
        var e = document.getElementsByClassName(k);
        for (var i = e.length - 1; i >= 0; i--) {
          e[i].textContent = uiStrings[k];
        }
      }
    });
  }
};