first commit
This commit is contained in:
21
plugins/i18n.ts
Executable file
21
plugins/i18n.ts
Executable file
@@ -0,0 +1,21 @@
|
||||
import { createI18n } from "vue-i18n";
|
||||
import { defineNuxtPlugin } from "#app";
|
||||
|
||||
const messages = {
|
||||
en: {
|
||||
welcome: "Welcome",
|
||||
// Add your translations here
|
||||
},
|
||||
// Add other languages here
|
||||
};
|
||||
|
||||
export default defineNuxtPlugin((nuxtApp) => {
|
||||
const i18n = createI18n({
|
||||
legacy: false,
|
||||
locale: "en",
|
||||
fallbackLocale: "en",
|
||||
messages,
|
||||
});
|
||||
|
||||
nuxtApp.vueApp.use(i18n);
|
||||
});
|
||||
Reference in New Issue
Block a user