diff --git a/app/[locale]/resources/page.tsx b/app/[locale]/resources/page.tsx index ebf565ceaaa..57c1a537554 100644 --- a/app/[locale]/resources/page.tsx +++ b/app/[locale]/resources/page.tsx @@ -1,4 +1,4 @@ -import { getTranslations } from "next-intl/server" +import { getTranslations, setRequestLocale } from "next-intl/server" import type { Lang, PageParams } from "@/lib/types" @@ -35,6 +35,8 @@ const Page = async (props: { params: Promise }) => { const params = await props.params const { locale } = params + setRequestLocale(locale) + const t = await getTranslations("page-resources") // Fetch data using the new data-layer functions (already cached) @@ -237,6 +239,9 @@ export async function generateMetadata(props: { const params = await props.params const { locale } = params + // Set locale before next-intl APIs so on-demand renders stay static + setRequestLocale(locale) + const t = await getTranslations("page-resources") return await getMetadata({