* move setLang() to a root layout

* fix: findLang only returns acceptable languages
* fix: fallback to use header x-lang if we haven't setLang yet
* fix: languageSchema, allow uppercase

Approved-by: Linus Flood
This commit is contained in:
Joakim Jäderberg
2025-02-19 09:06:37 +00:00
parent d27163a915
commit 873183ec2f
45 changed files with 159 additions and 117 deletions

View File

@@ -2,17 +2,12 @@ import ManagePreferencesButton from "@/components/Profile/ManagePreferencesButto
import Body from "@/components/TempDesignSystem/Text/Body"
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
import { getIntl } from "@/i18n"
import { setLang } from "@/i18n/serverContext"
import styles from "./page.module.css"
import type { LangParams, PageArgs } from "@/types/params"
export default async function CommunicationSlot({
params,
}: PageArgs<LangParams>) {
setLang(params.lang)
export default async function CommunicationSlot({}: PageArgs<LangParams>) {
const intl = await getIntl()
return (
<section className={styles.container}>