From: Raphaƫl Jakse Date: Wed, 15 Apr 2020 19:24:40 +0000 (+0200) Subject: Set the language of the document X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=da6f82bf551e4b3f622e3f1f08f4184cb6315d24;p=trivabble.git Set the language of the document --- diff --git a/index.html b/index.html index 9ff2d86..3a9899a 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - + Trivabble diff --git a/trivabble.js b/trivabble.js index 3a48441..38072cc 100644 --- a/trivabble.js +++ b/trivabble.js @@ -1266,6 +1266,9 @@ } trivabble.applyL10n = function () { + document.documentElement.lang = libD.lang; + document.documentElement.setAttribute("xml:lang", libD.lang); + for (const node of [].slice.call(document.querySelectorAll("[data-l10n]"))) { if (node.dataset.l10n === "text-content") { node.textContent = _(node.textContent.trim());