summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2014-01-01 19:02:34 -0500
committerAlex Xu <alex_y_xu@yahoo.ca>2014-01-01 19:02:34 -0500
commit1718523367e147e240cd6e9fe2c888491d102897 (patch)
tree15ee0cc2db954f9694df134f6cfbb035a8893f22 /www/js
parent902180ba926905f6002739919c4a814633ed3474 (diff)
downloadhtml5ks-1718523367e147e240cd6e9fe2c888491d102897.tar.xz
html5ks-1718523367e147e240cd6e9fe2c888491d102897.zip
Implement French UI.
Diffstat (limited to 'www/js')
-rw-r--r--www/js/html5ks.js2
-rw-r--r--www/js/i18n.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/www/js/html5ks.js b/www/js/html5ks.js
index 82cdfa3..59bd940 100644
--- a/www/js/html5ks.js
+++ b/www/js/html5ks.js
@@ -188,7 +188,7 @@ window.html5ks = {
xhr.open("GET", "json/" + name + ".json");
xhr.onload = function () {
html5ks.data[name] = JSON.parse(xhr.responseText);
- deferred.resolve();
+ deferred.resolve(html5ks.data[name]);
};
xhr.send();
}
diff --git a/www/js/i18n.js b/www/js/i18n.js
index 427d9b3..1d8f046 100644
--- a/www/js/i18n.js
+++ b/www/js/i18n.js
@@ -1,8 +1,8 @@
"use strict";
html5ks.i18n = {
init: function () {
- html5ks.fetch("json", "ui-strings").then(function () {
- var uiStrings = html5ks.data["ui-strings"];
+ 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--) {