TTikotok V4

This commit is contained in:
2026-07-10 11:29:04 +02:00
parent 1a9548cf25
commit 5c48def4e1
60 changed files with 6097 additions and 1319 deletions

View File

@@ -17,9 +17,11 @@ const LangContext = createContext<LangCtx>({
function getInitialLang(): Lang {
if (typeof document === 'undefined') return 'de'
if (window.location.pathname === '/') return 'de'
if (window.location.pathname === '/de' || window.location.pathname.startsWith('/de/')) return 'de'
if (window.location.pathname === '/es' || window.location.pathname.startsWith('/es/')) return 'es'
const pathname = window.location.pathname
if (pathname === '/') return 'de'
if (pathname === '/en' || pathname.startsWith('/en/')) return 'en'
if (pathname === '/de' || pathname.startsWith('/de/')) return 'de'
if (pathname === '/es' || pathname.startsWith('/es/')) return 'es'
const match = document.cookie.match(/(?:^|;\s*)lang=([^;]+)/)
const val = match?.[1]
return val === 'en' || val === 'es' || val === 'de' ? val : 'de'