summaryrefslogtreecommitdiff
path: root/www/js/i18n.js
blob: a41a7d29e9643a6a67b3c24f9f4e43588f7d26a6 (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];
        }
      }
    }, console.error);
  }
};