Add Scandinavian i18n (da/sv/nb) via DeepL pipeline.

Integrate new locale bundles, language cycling in the UI, SEO hreflang tags, and localized beta flyer HTML variants with scripts for batch translation and key validation.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-31 15:53:43 +02:00
parent 2e656dc6b2
commit 3749f87c1d
30 changed files with 3975 additions and 42 deletions
+22
View File
@@ -0,0 +1,22 @@
/** Supported UI languages (ISO 639-1, language-only). */
export const SUPPORTED_LANGUAGES = ['de', 'en', 'da', 'sv', 'nb'] as const
export type AppLanguage = (typeof SUPPORTED_LANGUAGES)[number]
export function normalizeAppLanguage(language?: string): AppLanguage {
const base = (language ?? 'en').split('-')[0].toLowerCase()
if ((SUPPORTED_LANGUAGES as readonly string[]).includes(base)) {
return base as AppLanguage
}
return 'en'
}
export function getNextLanguage(current?: string): AppLanguage {
const active = normalizeAppLanguage(current)
const index = SUPPORTED_LANGUAGES.indexOf(active)
return SUPPORTED_LANGUAGES[(index + 1) % SUPPORTED_LANGUAGES.length]
}
export function isGermanLocale(language?: string): boolean {
return normalizeAppLanguage(language) === 'de'
}