Fixed Change Language Direction In Setting Page

This commit is contained in:
Soroosh
2021-09-29 10:44:34 +03:30
29 changed files with 605 additions and 301 deletions

View File

@@ -1,27 +1,12 @@
<template>
<router-view />
<router-view />
</template>
<script>
import { i18n, localeDirection } from "./i18n";
import { setPageLocale } from "./util-frontend";
export default {
created() {
this.setPageLocale();
created() {
setPageLocale();
},
methods: {
setPageLocale() {
const html = document.documentElement
html.setAttribute('lang', this.$i18n.locale )
html.setAttribute('dir', localeDirection() )
}
},
watch: {
"$i18n.locale"() {
this.setPageLocale();
},
},
}
};
</script>