diff --git a/frontend/src/i18n/i18n.ts b/frontend/src/i18n/i18n.ts new file mode 100644 index 00000000..a695a15d --- /dev/null +++ b/frontend/src/i18n/i18n.ts @@ -0,0 +1,21 @@ +import { createI18n } from "vue-i18n"; + +// Import translations +import en from "@/i18n/locales/en.json"; +import nl from "@/i18n/locales/nl.json"; +import fr from "@/i18n/locales/fr.json"; +import de from "@/i18n/locales/de.json"; + +const i18n = createI18n({ + //legacy: false, + locale: "en", + fallbackLocale: "en", + messages: { + en: { ...en }, + nl: { ...nl }, + fr: { ...fr }, + de: { ...de }, + }, +}); + +export default i18n; diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.json new file mode 100644 index 00000000..e69de29b diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json new file mode 100644 index 00000000..e69de29b diff --git a/frontend/src/i18n/locales/fr.json b/frontend/src/i18n/locales/fr.json new file mode 100644 index 00000000..e69de29b diff --git a/frontend/src/i18n/locales/nl.json b/frontend/src/i18n/locales/nl.json new file mode 100644 index 00000000..e69de29b diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 7f6db814..e82313b5 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -1,15 +1,17 @@ -import { createApp } from "vue"; +import {createApp} from "vue"; // Vuetify import "vuetify/styles"; -import { createVuetify } from "vuetify"; +import {createVuetify} from "vuetify"; import * as components from "vuetify/components"; import * as directives from "vuetify/directives"; +import i18n from "./i18n/i18n.ts"; // Components import App from "./App.vue"; import router from "./router"; + const app = createApp(App); app.use(router); @@ -24,5 +26,5 @@ const vuetify = createVuetify({ directives, }); app.use(vuetify); - +app.use(i18n); app.mount("#app"); diff --git a/tsconfig.json b/tsconfig.json index b63e52cc..b41449cf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -118,7 +118,8 @@ /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + "resolveJsonModule": true } }