Is hutopy finally trilangual
This commit is contained in:
@@ -17,6 +17,21 @@
|
||||
|
||||
<script async setup>
|
||||
import SideBar from "@/views/main/SideBar.vue";
|
||||
import {useLanguageStore} from "@/stores/languageStore.js";
|
||||
import {watch} from "vue";
|
||||
import {useI18n} from "vue-i18n";
|
||||
|
||||
// Watch for language changes and update i18n locale
|
||||
const languageStore = useLanguageStore();
|
||||
const { locale } = useI18n();
|
||||
|
||||
// Watch for changes to the language store
|
||||
watch(() => languageStore.locale, (newLocale) => {
|
||||
if (newLocale) {
|
||||
locale.value = newLocale;
|
||||
}
|
||||
}, { immediate: true });
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user