feat(frontend): 'en' en 'nl' vertalingen zijn nu beschikbaar via de menubalk.
This commit is contained in:
parent
c1c10e27c1
commit
5a7bbf9d9c
10 changed files with 46 additions and 17 deletions
|
@ -1,20 +1,21 @@
|
|||
import { createI18n } from "vue-i18n";
|
||||
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";
|
||||
import en from "@/i18n/locale/en.json";
|
||||
import nl from "@/i18n/locale/nl.json";
|
||||
import fr from "@/i18n/locale/fr.json";
|
||||
import de from "@/i18n/locale/de.json";
|
||||
|
||||
const savedLocale = localStorage.getItem('user-lang') || 'en';
|
||||
|
||||
const i18n = createI18n({
|
||||
//legacy: false,
|
||||
locale: "en",
|
||||
fallbackLocale: "en",
|
||||
locale: savedLocale,
|
||||
fallbackLocale: 'en',
|
||||
messages: {
|
||||
en: { ...en },
|
||||
nl: { ...nl },
|
||||
fr: { ...fr },
|
||||
de: { ...de },
|
||||
en: en,
|
||||
nl: nl,
|
||||
fr: fr,
|
||||
de: de,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
3
frontend/src/i18n/locale/de.json
Normal file
3
frontend/src/i18n/locale/de.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"Welcome": "Willkommen"
|
||||
}
|
9
frontend/src/i18n/locale/en.json
Normal file
9
frontend/src/i18n/locale/en.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"Welcome": "Welcome",
|
||||
"student": "student",
|
||||
"teacher": "teacher",
|
||||
"assignments": "assignments",
|
||||
"classes": "classes",
|
||||
"discussions": "discussions",
|
||||
"logout": "log out"
|
||||
}
|
3
frontend/src/i18n/locale/fr.json
Normal file
3
frontend/src/i18n/locale/fr.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"Welcome": "Bienvenue"
|
||||
}
|
9
frontend/src/i18n/locale/nl.json
Normal file
9
frontend/src/i18n/locale/nl.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"Welcome": "Welkom",
|
||||
"student": "leerling",
|
||||
"teacher": "leerkracht",
|
||||
"assignments": "opdrachten",
|
||||
"classes": "klassen",
|
||||
"discussions": "discussies",
|
||||
"logout": "log uit"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue