Fix #1130: Set proper lang attribute on HTML document

This commit is contained in:
Agate 2020-07-04 11:39:42 +02:00
parent acedbb6db4
commit 24e414c6d9
2 changed files with 3 additions and 0 deletions

View File

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

View File

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