mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-01 01:25:45 -04:00
251d42f1a6
Add dir to html tag based on localeDirection Add Farsi to the languages
28 lines
478 B
Vue
28 lines
478 B
Vue
<template>
|
|
<router-view />
|
|
</template>
|
|
|
|
<script>
|
|
|
|
import { i18n, localeDirection } from "./i18n";
|
|
|
|
export default {
|
|
created() {
|
|
|
|
this.setPageLocale();
|
|
},
|
|
methods: {
|
|
setPageLocale() {
|
|
const html = document.documentElement
|
|
html.setAttribute('lang', this.$i18n.locale )
|
|
html.setAttribute('dir', localeDirection() )
|
|
}
|
|
},
|
|
watch: {
|
|
"$i18n.locale"() {
|
|
this.setPageLocale();
|
|
},
|
|
},
|
|
}
|
|
</script>
|