Programowanie · Budowanie i kod
nextjs-i18n
/nextjs-i18n
Wdraża internacjonalizację w Next.js 16: next-intl lub własne słowniki, routing lokalizacji, przełącznik języka i formatery.
Dla kogo
- Autor
- fusengine ↗
- Repozytorium
- agents ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 12.10.2026
Ocena i bezpieczeństwo
90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
- Pliki w paczce
- 24
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Przestarzałość
Brak sygnałów. Repozytorium zmienione 12.10.2026, bez odwołań do wycofanych modeli i API.
Licencja
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Wdraża internacjonalizację w Next.js 16: next-intl lub własne słowniki, routing lokalizacji, przełącznik języka i formatery.
Oryginalny opis (EN)
Use when implementing i18n in Next.js 16 — next-intl or DIY dictionaries, locale routing, language switch, or formatters.
Jak działa
- Agent Workflow (MANDATORY)
- Overview
- Two Approaches
- SOLID Architecture
- Routing Patterns
- Reference Guide
- Message Formatting
- Best Practices
- Error Handling
Sekcje z nagłówków SKILL.md, w oryginale · 157 linii, 693 słów
Podgląd SKILL.md
---
name: nextjs-i18n
description: Use when implementing i18n in Next.js 16 — next-intl or DIY dictionaries, locale routing, language switch, or formatters.
versions:
next-intl: 4.14
nextjs: 16
user-invocable: true
references: references/installation.md, references/pages-router.md, references/routing-setup.md, references/routing-config.md, references/translations.md, references/formatting.md, references/navigation.md, references/server-components.md, references/client-components.md, references/middleware-proxy.md, references/error-files.md, references/configuration.md, references/plugin.md, references/extraction.md, references/messages-validation.md, references/typescript.md, references/testing.md, references/integrations.md, references/seo.md, references/core-library.md, references/runtime-requirements.md, references/diy-dictionaries.md, references/diy-locale-detection.md
related-skills: nextjs-16, solid-nextjs
---
<objective>
Implements internationalization for Next.js 16 App Router apps via two approaches: next-intl (recommended — full Server Components support, type-safe messages, ICU MessageFormat, async message loading, proxy.ts-compatible routing) or a lightweight DIY dictionary approach using dynamic imports.
Covers `[locale]`-prefixed routing, localized navigation components (Link, redirect, usePathname, useRouter), date/number/currency/relative-time formatting, RTL language support, SEO hreflang tags, and localized special files (`[locale]/error.tsx`, `[locale]/not-found.tsx`, `global-error.tsx`). This is the Next.js-specific i18n skill (App Router routing, proxy.ts integration) — for plain React apps without Next.js see react-i18n, and for Astro see astro-i18n.
</objective>
# Next.js 16 Internationalization
Complete i18n solution with next-intl or DIY dictionary approach.
## Agent Workflow (MANDATORY)
Before ANY implementation, spawn 3 agents in parallel, one `Agent` call each with a `name`:
1. **fuse-ai-pilot:explore-codebase** - Analyze existing i18n setup and message files
2. **fuse-ai-pilot:research-expert** - Verify latest next-intl docs via Context7/Exa
3. **mcp__context7__query-docs** - Check locale config and patterns
After implementation, run **fuse-ai-pilot:sniper** for validation.
---
## Overview
### When to Use
- Building multilingual Next.js 16 applications
- Need locale-based routing with `[locale]` dynamic segment
- Implementing language switcher and URL localization
- Formatting dates, numbers, currencies, and relative times per locale
- SEO optimization with hreflang tags and localized metadata
- Supporting right-to-left (RTL) languages
### Why next-intl
| Feature | Benefit |
|---------|---------|
| App Router native | Full Server Components support |
| Type-safe messages | TypeScript autocompletion for keys |
| ICU MessageFormat | Pluralization, gender, select expressions |
| Async message loading | Load translations on-demand per locale |
| proxy.ts compatible | Works with Next.js 16 proxy pattern |
| Rich formatting | Dates, numbers, lists, relative time |
---
## Two Approaches
### 1. next-intl (Recommended)
Full-featured library with routing, formatting, and type safety. Best for production applications needing comprehensive i18n support.
### 2. DIY Dictionary
Lightweight approach using dynamic imports for simple translation needs. Good for projects wanting minimal dependencies.
---
## SOLID Architecture
### Module Structure
All i18n code organized in `modules/cores/i18n/`:
- **config/** - Routing configuration, locale definitions
- **interfaces/** - TypeScript types for messages and locales
- **services/** - Request handlers, message loaders
- **messages/** - JSON translation files per locale
### File Locations
- `src/modules/cores/i18n/src/config/routing.ts` - Locale routing config
- `src/modules/cores/i18n/messages/en.json` - English translations
- `src/modules/cores/i18n/messages/es.json` - Spanish translations
- `proxy.ts` - Locale detection and redirect logic
---
## Routing Patterns
### Locale Segment
All routes prefixed with `[locale]` dynamic segment:
- `/en/about` → English about page
- `/es/about` → Spanish about page
- `/` → Redirects to default locale
### Navigation Components
Use localized navigation from next-intl for automatic locale handling:
- **Link** - Locale-aware anchor links
- **redirect** - Server-side locale redirect
- **usePathname** - Current path without locale
- **useRouter** - Programmatic navigation
---
## Reference Guide
| Need | Reference |
|------|-----------|
| Initial setup | [installation.md](references/installation.md), [routing-setup.md](references/routing-setup.md) |
| Route config | [routing-config.md](references/routing-config.md), [middleware-proxy.md](references/middleware-proxy.md) |
| Translations | [translations.md](references/translations.md), [messages-validation.md](references/messages-validation.md) |
| Formatting | [formatting.md](references/formatting.md) |
| Components | [server-components.md](references/server-components.md), [client-components.md](references/client-components.md) |
| Navigation | [navigation.md](references/navigation.md) |
| TypeScript | [typescript.md](references/typescript.md) |
| SEO | [seo.md](references/seo.md) |
| Testing | [testing.md](references/testing.md) |
| DIY approach | [diy-dictionaries.md](references/diy-dictionaries.md), [diy-locale-detection.md](references/diy-locale-detection.md) |
---
## Message Formatting
### ICU MessageFormat
- **Pluralization** - `{count, plural, one {# item} other {# items}}`
- **Select** - `{gender, select, male {He} female {She} other {They}}`
- **Rich text** - Support for bold, italic, links in messages
### Formatters
- **formatDate** - Locale-aware date formatting
- **formatNumber** - Currency, percentages, decimals
- **formatList** - Conjunction/disjunction lists
- **formatRelativeTime** - "2 hours ago", "in 3 days"
---
## Best Practices
1. **Type-safe keys** - Use TypeScript for message key autocompletion
2. **Namespace messages** - Organize by feature/page for maintainability
3. **Server-first** - Load translations on server, avoid client bundles
4. **SEO hreflang** - Add alternate links for all locales
5. **RTL support** - Use `dir` attribute for right-to-left languages
6. **Fallback locale** - Configure default for missing translations
---
## Error Handling
### Special Files
Localized error and loading states require specific handling:
- `[locale]/error.tsx` - Localized error boundary
- `[locale]/not-found.tsx` - Localized 404 page
- `global-error.tsx` - Root error fallback
See [error-files.md](references/error-files.md) for complete patterns.
Pliki w paczce (24)
- SKILL.md 7 KB
- references/client-components.md 3 KB
- references/configuration.md 3 KB
- references/core-library.md 2 KB
- references/diy-dictionaries.md 3 KB
- references/diy-locale-detection.md 3 KB
- references/error-files.md 2 KB
- references/extraction.md 3 KB
- references/formatting.md 2 KB
- references/installation.md 2 KB
- references/integrations.md 2 KB
- references/messages-validation.md 2 KB
- references/middleware-proxy.md 3 KB
- references/navigation.md 3 KB
- references/pages-router.md 2 KB
- references/plugin.md 2 KB
- references/routing-config.md 3 KB
- references/routing-setup.md 3 KB
- references/runtime-requirements.md 2 KB
- references/seo.md 2 KB
- references/server-components.md 3 KB
- references/testing.md 3 KB
- references/translations.md 2 KB
- references/typescript.md 2 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · fusengine/agents | 90 | MIT |
| HoangNguyen0403/agent-skills-standard | 100 | MIT |
Migawka bazy z 28.10.2026 · wersja paczki e1946b237305 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100next-intl
Dodaje internacjonalizację do aplikacji Next.js App Router z next-intl: routing z prefiksem języka, tłumaczenia ICU oraz formatowanie dat, liczb i list zależne od ustawień regionalnych. - 100i18n
Zbiera wiedzę o internacjonalizacji w Next.js: next-intl, routing lokalizacji, SEO wielojęzyczne i tłumaczenie treści, na przykład na włoski, angielski i czeski. - 100enable-i18n
Włącza internacjonalizację next-intl w szablonie sklepu: adresy URL z prefiksem języka, katalogi komunikatów i przełącznik języka, bez integracji Shopify Markets. - 100i18n
Dodaje internacjonalizację do projektu Next.js z next-intl: ponad 14 języków, routing lokalizacji przyjazny dla SEO, mapy witryn z hreflang i hurtowe tłumaczenie. - 95setup-i18n
Konfiguruje wielojęzyczność w Next.js App Router przez next-intl: wykrywanie języka, pliki tłumaczeń i routing. - 100set-up-i18n
Wdraża internacjonalizację frontendu: i18next lub vue-i18n z typowanymi kluczami, leniwie ładowanymi katalogami i formatowaniem Intl.