diff --git a/client/layouts/default.vue b/client/layouts/default.vue
index 8708468c..1e13f5ed 100644
--- a/client/layouts/default.vue
+++ b/client/layouts/default.vue
@@ -4,7 +4,7 @@
-
+
@@ -31,7 +31,8 @@ export default {
socket: null,
isSocketConnected: false,
isFirstSocketConnection: true,
- socketConnectionToastId: null
+ socketConnectionToastId: null,
+ currentLang: null
}
},
watch: {
@@ -519,6 +520,10 @@ export default {
.catch((error) => {
console.error('Failed to load tasks', error)
})
+ },
+ changeLanguage(code) {
+ console.log('Changed lang', code)
+ this.currentLang = code
}
},
beforeMount() {
@@ -527,6 +532,7 @@ export default {
mounted() {
this.updateBodyClass()
this.resize()
+ this.$eventBus.$on('change-lang', this.changeLanguage)
window.addEventListener('resize', this.resize)
window.addEventListener('keydown', this.keyDown)
@@ -544,6 +550,7 @@ export default {
}
},
beforeDestroy() {
+ this.$eventBus.$off('change-lang', this.changeLanguage)
window.removeEventListener('resize', this.resize)
window.removeEventListener('keydown', this.keyDown)
}
diff --git a/client/pages/account.vue b/client/pages/account.vue
index edc57b1c..5f689d77 100644
--- a/client/pages/account.vue
+++ b/client/pages/account.vue
@@ -12,8 +12,12 @@
+
+
{{ $strings.LabelLanguage }}
+
+
-
+
{{ $strings.HeaderChangePassword }}