summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortg(x) <*@tg-x.net>2016-12-20 22:43:40 +0100
committertg(x) <*@tg-x.net>2016-12-20 22:43:40 +0100
commit14585cd23fb5f31a5e896260ae1ab41657f41f7c (patch)
tree9797e621497f0004e331ca0729ad804208031290
parent65164a58bcb0817d655142d3118000325ad2249a (diff)
setLang() fix
-rw-r--r--lang.js19
1 files changed, 10 insertions, 9 deletions
diff --git a/lang.js b/lang.js
index fe08fde2..24faa9f7 100644
--- a/lang.js
+++ b/lang.js
@@ -34,15 +34,16 @@ function supports_html5_storage() {
function setLang(l)
{
- // FIXME: hotfix since t10n does not work
- //document.body.className=l;
- //if (supports_html5_storage()) {
- // sessionStorage.setItem('lang', l);
- //}
- //if (l == 'en') document.title = 'GNU Taler - Taxable Anonymous Libre Electronic Reserve';
- //if (l == 'de') document.title = 'GNU Taler - Taxierbare Anonyme Liberale Elektronische Reserven';
- //if (l == 'fr') document.title = 'GNU Taler - Taxable Anonyme Libre Électronique Réserve';
- //if (l == 'it') document.title = 'GNU Taler';
+ document.body.className=l;
+ document.body.parentNode.setAttribute('lang', l);
+
+ if (supports_html5_storage()) {
+ sessionStorage.setItem('lang', l);
+ }
+ if (l == 'en') document.title = 'GNU Taler - Taxable Anonymous Libre Electronic Reserve';
+ if (l == 'de') document.title = 'GNU Taler - Taxierbare Anonyme Liberale Elektronische Reserven';
+ if (l == 'fr') document.title = 'GNU Taler - Taxable Anonyme Libre Électronique Réserve';
+ if (l == 'it') document.title = 'GNU Taler';
}
function get_default_lang()