next-intl-setRequestLocale-ssg-fix

Fix for next-intl v4 SSG pages showing wrong locale (typically English fallback) despite correct build output. Use when: (1) next-intl pages build successfully with generateStaticParams but render the default locale instead of the expected one, (2) page metadata (from getTranslations with explicit locale) shows correct locale but client components show wrong locale, (3) getMessages() returns default locale messages in [locale] layout/pages. Root cause: missing setRequestLocale() call before getMessages() in server components with static generation.

hubeiqiao Updated 0 repo stars

File contents

hubeiqiao/skills commit 7c2cf6c3d1

Frequently asked questions

npx get-skill add hubeiqiao/next-intl-setrequestlocale-ssg-fix