Next.js 16 i18n modular SOLID - proxy.ts, modules/cores/i18n/, [lang] segment, await params. Use when implementing translations in Next.js App Router.
View on GitHubfusengine/agents
fuse-nextjs
plugins/nextjs-expert/skills/nextjs-i18n/SKILL.md
January 22, 2026
Select agents to install to:
npx add-skill https://github.com/fusengine/agents/blob/main/plugins/nextjs-expert/skills/nextjs-i18n/SKILL.md -a claude-code --skill nextjs-i18nInstallation paths:
.claude/skills/nextjs-i18n/# Next.js 16 Internationalization (SOLID)
## Modular Architecture
```text
src/
├── app/[lang]/
│ ├── layout.tsx # Imports from modules/cores/i18n
│ └── page.tsx
│
├── modules/cores/i18n/ # i18n module in cores
│ ├── src/
│ │ ├── interfaces/
│ │ │ └── i18n.interface.ts
│ │ ├── services/
│ │ │ ├── dictionary.service.ts
│ │ │ └── locale.service.ts
│ │ └── config/
│ │ └── locales.ts
│ └── dictionaries/
│ ├── en.json
│ └── fr.json
│
└── proxy.ts # Root level (Next.js requirement)
```
---
## Config (modules/cores/i18n/src/config/locales.ts)
```typescript
/** Supported locales configuration. */
export const locales = ['en', 'fr', 'de'] as const
/** Default locale. */
export const defaultLocale = 'en'
/** Locale type. */
export type Locale = (typeof locales)[number]
```
---
## Interfaces (modules/cores/i18n/src/interfaces/i18n.interface.ts)
```typescript
import type { Locale } from '../config/locales'
/** Dictionary structure. */
export interface Dictionary {
home: {
title: string
description: string
}
nav: {
home: string
about: string
}
}
/** Page props with lang param. */
export interface LangPageProps {
params: Promise<{ lang: Locale }>
}
/** Layout props with lang param. */
export interface LangLayoutProps {
children: React.ReactNode
params: Promise<{ lang: Locale }>
}
```
---
## Services (modules/cores/i18n/src/services/)
### dictionary.service.ts
```typescript
import 'server-only'
import type { Locale } from '../config/locales'
import type { Dictionary } from '../interfaces/i18n.interface'
const dictionaries: Record<Locale, () => Promise<Dictionary>> = {
en: () => import('../../dictionaries/en.json').then((m) => m.default),
fr: () => import('../../dictionaries/fr.json').then((m) => m.default),
de: () => import('../../dictionaries/de.json').then((m) => m.default),
}
/**
* Get dictionary for locale.
*
* @param locale - Targ