This repository was archived by the owner on Dec 31, 2024. It is now read-only.
Replies: 1 comment
-
I managed to read a persisted locale from store in main.js. The relevant code looks something like this: import { Vue, createApp } from 'vue';
import App from './App.vue';
import i18n from './i18n';
import { createPinia } from 'pinia';
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
import { useMainStore } from '@/store';
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);
const app = createApp(App).use(pinia)
.use(i18n);
const mainStore = useMainStore();
i18n.global.locale.value = mainStore.locale;
app.mount('#app'); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
i use vue3.2.6 vue-i18n9.1.7 pinia2.0.13
and i need use store in creatI18n()like
i want,and i read the doc,but is also throw error
Beta Was this translation helpful? Give feedback.
All reactions