mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Update:Set lang in HTML tag #1399
This commit is contained in:
parent
a5627a1b52
commit
f557289274
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user