feat(i18n): replace language cycle buttons with flag dropdown selector using inline SVGs

This commit is contained in:
2026-06-07 12:59:40 +02:00
parent 944f4518e9
commit 4dfe2cea4e
8 changed files with 364 additions and 50 deletions
+8
View File
@@ -6,6 +6,14 @@ export const SUPPORTED_LANGUAGES = ['de', 'en', 'da', 'sv', 'nb'] as const
export type AppLanguage = (typeof SUPPORTED_LANGUAGES)[number]
export const LANGUAGE_FLAGS: Record<AppLanguage, string> = {
de: '🇩🇪',
en: '🇬🇧',
da: '🇩🇰',
sv: '🇸🇪',
nb: '🇳🇴'
}
export function normalizeAppLanguage(language?: string): AppLanguage {
const base = (language ?? 'en').split('-')[0].toLowerCase()
if ((SUPPORTED_LANGUAGES as readonly string[]).includes(base)) {