diff --git a/client/layouts/default.vue b/client/layouts/default.vue index 8c9316fa..b201fc4a 100644 --- a/client/layouts/default.vue +++ b/client/layouts/default.vue @@ -569,6 +569,7 @@ export default { changeLanguage(code) { console.log('Changed lang', code) this.currentLang = code + document.documentElement.lang = code } }, beforeMount() { @@ -593,6 +594,11 @@ export default { this.$toast.error(this.$route.query.error) this.$router.replace(this.$route.path) } + + // Set lang on HTML tag + if (this.$languageCodes?.current) { + document.documentElement.lang = this.$languageCodes.current + } }, beforeDestroy() { this.$eventBus.$off('change-lang', this.changeLanguage)