next-intl-setRequestLocale-ssg-fix

Community

Fix SSG locale issues in next-intl

Authorhubeiqiao
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill resolves an issue where static-generated pages in Next.js using next-intl v4+ incorrectly display the default locale instead of the intended one at runtime.

Core Features & Use Cases

  • SSG Locale Correction: Ensures correct locale rendering for statically generated pages.
  • Server Component Fix: Addresses the root cause by correctly setting the locale context in server components.
  • Use Case: When your Next.js app builds pages for multiple languages using generateStaticParams but all pages show English content, this skill provides the necessary fix.

Quick Start

Apply the setRequestLocale function before getMessages in your server components.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: next-intl-setRequestLocale-ssg-fix
Download link: https://github.com/hubeiqiao/skills/archive/main.zip#next-intl-setrequestlocale-ssg-fix

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.