feat(frontend): i18n en vertalingsbestanden initialisatie
This commit is contained in:
parent
8a7fa271ba
commit
c1c10e27c1
7 changed files with 28 additions and 4 deletions
21
frontend/src/i18n/i18n.ts
Normal file
21
frontend/src/i18n/i18n.ts
Normal file
|
@ -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;
|
0
frontend/src/i18n/locales/de.json
Normal file
0
frontend/src/i18n/locales/de.json
Normal file
0
frontend/src/i18n/locales/en.json
Normal file
0
frontend/src/i18n/locales/en.json
Normal file
0
frontend/src/i18n/locales/fr.json
Normal file
0
frontend/src/i18n/locales/fr.json
Normal file
0
frontend/src/i18n/locales/nl.json
Normal file
0
frontend/src/i18n/locales/nl.json
Normal file
|
@ -1,15 +1,17 @@
|
||||||
import { createApp } from "vue";
|
import {createApp} from "vue";
|
||||||
|
|
||||||
// Vuetify
|
// Vuetify
|
||||||
import "vuetify/styles";
|
import "vuetify/styles";
|
||||||
import { createVuetify } from "vuetify";
|
import {createVuetify} from "vuetify";
|
||||||
import * as components from "vuetify/components";
|
import * as components from "vuetify/components";
|
||||||
import * as directives from "vuetify/directives";
|
import * as directives from "vuetify/directives";
|
||||||
|
import i18n from "./i18n/i18n.ts";
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
import App from "./App.vue";
|
import App from "./App.vue";
|
||||||
import router from "./router";
|
import router from "./router";
|
||||||
|
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
|
||||||
app.use(router);
|
app.use(router);
|
||||||
|
@ -24,5 +26,5 @@ const vuetify = createVuetify({
|
||||||
directives,
|
directives,
|
||||||
});
|
});
|
||||||
app.use(vuetify);
|
app.use(vuetify);
|
||||||
|
app.use(i18n);
|
||||||
app.mount("#app");
|
app.mount("#app");
|
||||||
|
|
|
@ -118,7 +118,8 @@
|
||||||
|
|
||||||
/* Completeness */
|
/* Completeness */
|
||||||
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
||||||
"skipLibCheck": true
|
"skipLibCheck": true,
|
||||||
/* Skip type checking all .d.ts files. */
|
/* Skip type checking all .d.ts files. */
|
||||||
|
"resolveJsonModule": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue