feat: lang
This commit is contained in:
+15
-2
@@ -1,4 +1,17 @@
|
||||
import { createApp } from "vue";
|
||||
import App from "./App.vue";
|
||||
import { createI18n } from "vue-i18n";
|
||||
import App from "@/App.vue";
|
||||
import { getLang } from "@/lib/lang";
|
||||
const en = await import("@lang/en.json");
|
||||
const fr = await import("@lang/fr.json");
|
||||
|
||||
createApp(App).mount("#app");
|
||||
const i18n = createI18n({
|
||||
locale: getLang(),
|
||||
fallbackLocale: "en",
|
||||
messages: {
|
||||
en: en,
|
||||
fr: fr,
|
||||
},
|
||||
});
|
||||
|
||||
createApp(App).use(i18n).mount("#app");
|
||||
|
||||
Reference in New Issue
Block a user