feat: localizations

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-07-07 16:56:58 -04:00
parent 6931dc9ff7
commit 0cc255a087
27 changed files with 728 additions and 28 deletions
+24
View File
@@ -0,0 +1,24 @@
{
"header": {
"searchPlaceholder": "Hier suchen.."
},
"systemMenu": {
"administration": "Administration",
"applications": "Anwendungen",
"personalSettings": "Persönliche Einstellungen",
"toggleAdmin": "Admin",
"toggleApps": "Apps",
"toggleSettings": "Einstellungen"
},
"notifications": {
"markAllRead": "Alle als gelesen markieren",
"title": "Benachrichtigungen",
"viewAll": "Alle anzeigen"
},
"userMenu": {
"darkMode": "Dunkles Design",
"lightMode": "Helles Design",
"logout": "Abmelden",
"settings": "Einstellungen"
}
}
+14
View File
@@ -0,0 +1,14 @@
{
"systemMenu": {
"adminSettings": "System",
"apps": "Applications",
"personalSettings": "Settings",
"userSettings": "Settings"
},
"userMenu": {
"darkMode": "Dark Mode",
"lightMode": "Light Mode",
"logout": "Logout",
"settings": "Settings"
}
}
+33
View File
@@ -0,0 +1,33 @@
import { createI18n } from 'vue-i18n';
import { en as vuetifyEn, de as vuetifyDe } from 'vuetify/locale';
export const FALLBACK_LOCALE = 'en';
/**
* The single vue-i18n instance shared by the core shell and all modules.
*/
export const i18n = createI18n({
legacy: false,
globalInjection: false,
locale: FALLBACK_LOCALE,
fallbackLocale: FALLBACK_LOCALE,
missingWarn: import.meta.env.DEV,
fallbackWarn: false,
messages: {
// Vuetify component strings ($vuetify.*) ride along in the same
// instance, consumed through the createVueI18nAdapter in the vuetify
// plugin. Statically imported: adding a locale means adding it here.
en: { $vuetify: vuetifyEn },
de: { $vuetify: vuetifyDe },
},
});
/** Merge a catalog's messages under a namespace for the given locale. */
export function mergeCatalog(locale: string, namespace: string, messages: Record<string, unknown>): void {
i18n.global.mergeLocaleMessage(locale, { [namespace]: messages });
}
/** Switch the active locale of the shared instance. */
export function applyLocale(locale: string): void {
i18n.global.locale.value = locale;
}