From da6f82bf551e4b3f622e3f1f08f4184cb6315d24 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Jakse?= Date: Wed, 15 Apr 2020 21:24:40 +0200 Subject: [PATCH] Set the language of the document --- index.html | 2 +- trivabble.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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()); -- 2.30.2