# Send i18n (Internationalization) guideline skills for nextjs web development to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "web-i18n-nextjs",
    "name": "i18n (Internationalization) guideline skills for nextjs web development",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/javainthinking/web-i18n-nextjs",
    "canonicalUrl": "https://clawhub.ai/javainthinking/web-i18n-nextjs",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/web-i18n-nextjs",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=web-i18n-nextjs",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/translation-files.md",
      "references/routing.md",
      "references/structured-data.md",
      "references/seo-metadata.md",
      "references/sitemap.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "web-i18n-nextjs",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-04T23:12:33.718Z",
      "expiresAt": "2026-05-11T23:12:33.718Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=web-i18n-nextjs",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=web-i18n-nextjs",
        "contentDisposition": "attachment; filename=\"web-i18n-nextjs-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "web-i18n-nextjs"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/web-i18n-nextjs"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/web-i18n-nextjs",
    "downloadUrl": "https://openagent3.xyz/downloads/web-i18n-nextjs",
    "agentUrl": "https://openagent3.xyz/skills/web-i18n-nextjs/agent",
    "manifestUrl": "https://openagent3.xyz/skills/web-i18n-nextjs/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/web-i18n-nextjs/agent.md"
  }
}
```
## Documentation

### Core Principles

All user-facing features must implement i18n — no hardcoded strings in components.
Translations must be natural and idiomatic — never use scripts or machine translation; treat quality the same as English copywriting.
SEO metadata, JSON-LD structured data, and sitemaps must all be locale-aware.
Default locale (English) uses clean URLs with no prefix (/products); other locales use a prefix (/es/products).

### Supported Locales

Locale list lives in src/lib/i18n/locales.ts. Keep the sitemap script's locales array in sync with this file.

export const locales = ['en', 'es', 'fr', 'de', 'ja', 'zh-CN', /* ... add as needed */]
export const defaultLocale = 'en'
export type Locale = typeof locales[number]

### Directory Structure

src/app/[lang]/
├── dictionaries/       ← One JSON file per locale
│   ├── en.json
│   ├── es.json
│   └── ...
├── dictionaries.ts     ← getDictionary(locale) server helper
├── layout.tsx          ← Root layout: generateMetadata + hreflang + JSON-LD
└── <page>/
    └── page.tsx        ← generateMetadata + page content

### Translation Files

See references/translation-files.md for:

JSON key hierarchy conventions (page.section.key)
Server-side getDictionary() usage
Client-side useDictionary() hook usage
Template variable pattern ({count} substitution)
Fallback pattern for missing keys

### Routing & Middleware

See references/routing.md for:

src/middleware.ts — locale detection, redirect /en/* → /*, rewrite for default locale
LocalizedLink component — automatically prefixes non-default locales
useLocale() hook — reads locale from URL params → pathname → localStorage → default
getLocalizedPath() / removeLocalePrefix() utilities

### SEO Metadata

See references/seo-metadata.md for:

generateMetadata() pattern in layout/page files
generateAlternatesMetadata() from src/lib/i18n/seo.ts
Full hreflang alternates.languages output (all locales + x-default)
OpenGraph locale / alternateLocale fields
html lang attribute and LangSetter client component

### Structured JSON-LD Data

See references/structured-data.md for:

WebApplication schema with translated featureList, description
BlogPosting schema with inLanguage field
FAQ schema with translated acceptedAnswer
BreadcrumbList schema with localized URLs
Rendering via <Script> or <script> tags

### Multi-language Sitemap

See references/sitemap.md for:

Sitemap structure: one <url> entry per page with <xhtml:link> alternates for every locale
<loc> uses the default-locale (clean) URL; x-default also points there
Full XML example with static and dynamic pages
Next.js App Router sitemap.ts implementation pattern
What to include vs. exclude (admin/API routes excluded)
Hreflang language code format rules

### Quick Checklist — Adding a New Feature with i18n

Add translation keys to all locale JSON files in src/app/[lang]/dictionaries/

Add English first, then translate to all other languages naturally


Server components: const dict = await getDictionary(locale) → dict?.page?.section?.key || 'fallback'
Client components: const dict = useDictionary() → same fallback pattern
Add generateMetadata() to the page file, calling generateAlternatesMetadata()
Add JSON-LD structured data script tag with translated fields and inLanguage
Update sitemap if the page is new: add it to the sitemap source (see references/sitemap.md)
Use <LocalizedLink> for internal links and getLocalizedPath() for programmatic navigation

### Quick Checklist — Adding a New Locale

Add locale code to locales array in src/lib/i18n/locales.ts
Add locale entry to dictionaries/ as <code>.json (full translation of en.json)
Add entry in src/app/[lang]/dictionaries.ts import map
Add display name in LanguageSwitcher languageNames map
Sync the sitemap locale list with the app's locales array
Regenerate / redeploy the sitemap
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: javainthinking
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-04T23:12:33.718Z
- Expires at: 2026-05-11T23:12:33.718Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/web-i18n-nextjs)
- [Send to Agent page](https://openagent3.xyz/skills/web-i18n-nextjs/agent)
- [JSON manifest](https://openagent3.xyz/skills/web-i18n-nextjs/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/web-i18n-nextjs/agent.md)
- [Download page](https://openagent3.xyz/downloads/web-i18n-nextjs)