Fix #1130: Set proper lang attribute on HTML document

environments/review-docs-devel-1399dq/deployments/6607
Agate 2020-07-04 11:39:42 +02:00
rodzic acedbb6db4
commit 24e414c6d9
2 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1 @@
Set proper lang attribute on HTML document (#1130)

Wyświetl plik

@ -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