From 24e414c6d9457bc46f647d90ab77bf1f653ffa72 Mon Sep 17 00:00:00 2001 From: Agate Date: Sat, 4 Jul 2020 11:39:42 +0200 Subject: [PATCH] Fix #1130: Set proper lang attribute on HTML document --- changes/changelog.d/1130.enhancement | 1 + front/src/App.vue | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 changes/changelog.d/1130.enhancement diff --git a/changes/changelog.d/1130.enhancement b/changes/changelog.d/1130.enhancement new file mode 100644 index 000000000..07318ba95 --- /dev/null +++ b/changes/changelog.d/1130.enhancement @@ -0,0 +1 @@ +Set proper lang attribute on HTML document (#1130) \ No newline at end of file diff --git a/front/src/App.vue b/front/src/App.vue index de76d1c2a..702fd36b9 100644 --- a/front/src/App.vue +++ b/front/src/App.vue @@ -369,6 +369,8 @@ export default { immediate: true, handler(newValue) { let self = this + let htmlLocale = newValue.toLowerCase().replace('_', '-') + document.documentElement.setAttribute('lang', htmlLocale); if (newValue === 'en_US') { self.$language.current = 'noop' self.$language.current = newValue