{
  "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": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/web-i18n-nextjs",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=web-i18n-nextjs",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "references/translation-files.md",
      "references/routing.md",
      "references/structured-data.md",
      "references/seo-metadata.md",
      "references/sitemap.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/web-i18n-nextjs",
    "agentPageUrl": "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"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Core Principles",
        "body": "All user-facing features must implement i18n — no hardcoded strings in components.\nTranslations must be natural and idiomatic — never use scripts or machine translation; treat quality the same as English copywriting.\nSEO metadata, JSON-LD structured data, and sitemaps must all be locale-aware.\nDefault locale (English) uses clean URLs with no prefix (/products); other locales use a prefix (/es/products)."
      },
      {
        "title": "Supported Locales",
        "body": "Locale list lives in src/lib/i18n/locales.ts. Keep the sitemap script's locales array in sync with this file.\n\nexport const locales = ['en', 'es', 'fr', 'de', 'ja', 'zh-CN', /* ... add as needed */]\nexport const defaultLocale = 'en'\nexport type Locale = typeof locales[number]"
      },
      {
        "title": "Directory Structure",
        "body": "src/app/[lang]/\n├── dictionaries/       ← One JSON file per locale\n│   ├── en.json\n│   ├── es.json\n│   └── ...\n├── dictionaries.ts     ← getDictionary(locale) server helper\n├── layout.tsx          ← Root layout: generateMetadata + hreflang + JSON-LD\n└── <page>/\n    └── page.tsx        ← generateMetadata + page content"
      },
      {
        "title": "Translation Files",
        "body": "See references/translation-files.md for:\n\nJSON key hierarchy conventions (page.section.key)\nServer-side getDictionary() usage\nClient-side useDictionary() hook usage\nTemplate variable pattern ({count} substitution)\nFallback pattern for missing keys"
      },
      {
        "title": "Routing & Middleware",
        "body": "See references/routing.md for:\n\nsrc/middleware.ts — locale detection, redirect /en/* → /*, rewrite for default locale\nLocalizedLink component — automatically prefixes non-default locales\nuseLocale() hook — reads locale from URL params → pathname → localStorage → default\ngetLocalizedPath() / removeLocalePrefix() utilities"
      },
      {
        "title": "SEO Metadata",
        "body": "See references/seo-metadata.md for:\n\ngenerateMetadata() pattern in layout/page files\ngenerateAlternatesMetadata() from src/lib/i18n/seo.ts\nFull hreflang alternates.languages output (all locales + x-default)\nOpenGraph locale / alternateLocale fields\nhtml lang attribute and LangSetter client component"
      },
      {
        "title": "Structured JSON-LD Data",
        "body": "See references/structured-data.md for:\n\nWebApplication schema with translated featureList, description\nBlogPosting schema with inLanguage field\nFAQ schema with translated acceptedAnswer\nBreadcrumbList schema with localized URLs\nRendering via <Script> or <script> tags"
      },
      {
        "title": "Multi-language Sitemap",
        "body": "See references/sitemap.md for:\n\nSitemap structure: one <url> entry per page with <xhtml:link> alternates for every locale\n<loc> uses the default-locale (clean) URL; x-default also points there\nFull XML example with static and dynamic pages\nNext.js App Router sitemap.ts implementation pattern\nWhat to include vs. exclude (admin/API routes excluded)\nHreflang language code format rules"
      },
      {
        "title": "Quick Checklist — Adding a New Feature with i18n",
        "body": "Add translation keys to all locale JSON files in src/app/[lang]/dictionaries/\n\nAdd English first, then translate to all other languages naturally\n\n\nServer components: const dict = await getDictionary(locale) → dict?.page?.section?.key || 'fallback'\nClient components: const dict = useDictionary() → same fallback pattern\nAdd generateMetadata() to the page file, calling generateAlternatesMetadata()\nAdd JSON-LD structured data script tag with translated fields and inLanguage\nUpdate sitemap if the page is new: add it to the sitemap source (see references/sitemap.md)\nUse <LocalizedLink> for internal links and getLocalizedPath() for programmatic navigation"
      },
      {
        "title": "Quick Checklist — Adding a New Locale",
        "body": "Add locale code to locales array in src/lib/i18n/locales.ts\nAdd locale entry to dictionaries/ as <code>.json (full translation of en.json)\nAdd entry in src/app/[lang]/dictionaries.ts import map\nAdd display name in LanguageSwitcher languageNames map\nSync the sitemap locale list with the app's locales array\nRegenerate / redeploy the sitemap"
      }
    ],
    "body": "i18n for Next.js — Implementation Guide\nCore Principles\nAll user-facing features must implement i18n — no hardcoded strings in components.\nTranslations must be natural and idiomatic — never use scripts or machine translation; treat quality the same as English copywriting.\nSEO metadata, JSON-LD structured data, and sitemaps must all be locale-aware.\nDefault locale (English) uses clean URLs with no prefix (/products); other locales use a prefix (/es/products).\nSupported Locales\n\nLocale list lives in src/lib/i18n/locales.ts. Keep the sitemap script's locales array in sync with this file.\n\nexport const locales = ['en', 'es', 'fr', 'de', 'ja', 'zh-CN', /* ... add as needed */]\nexport const defaultLocale = 'en'\nexport type Locale = typeof locales[number]\n\nDirectory Structure\nsrc/app/[lang]/\n├── dictionaries/       ← One JSON file per locale\n│   ├── en.json\n│   ├── es.json\n│   └── ...\n├── dictionaries.ts     ← getDictionary(locale) server helper\n├── layout.tsx          ← Root layout: generateMetadata + hreflang + JSON-LD\n└── <page>/\n    └── page.tsx        ← generateMetadata + page content\n\nTranslation Files\n\nSee references/translation-files.md for:\n\nJSON key hierarchy conventions (page.section.key)\nServer-side getDictionary() usage\nClient-side useDictionary() hook usage\nTemplate variable pattern ({count} substitution)\nFallback pattern for missing keys\nRouting & Middleware\n\nSee references/routing.md for:\n\nsrc/middleware.ts — locale detection, redirect /en/* → /*, rewrite for default locale\nLocalizedLink component — automatically prefixes non-default locales\nuseLocale() hook — reads locale from URL params → pathname → localStorage → default\ngetLocalizedPath() / removeLocalePrefix() utilities\nSEO Metadata\n\nSee references/seo-metadata.md for:\n\ngenerateMetadata() pattern in layout/page files\ngenerateAlternatesMetadata() from src/lib/i18n/seo.ts\nFull hreflang alternates.languages output (all locales + x-default)\nOpenGraph locale / alternateLocale fields\nhtml lang attribute and LangSetter client component\nStructured JSON-LD Data\n\nSee references/structured-data.md for:\n\nWebApplication schema with translated featureList, description\nBlogPosting schema with inLanguage field\nFAQ schema with translated acceptedAnswer\nBreadcrumbList schema with localized URLs\nRendering via <Script> or <script> tags\nMulti-language Sitemap\n\nSee references/sitemap.md for:\n\nSitemap structure: one <url> entry per page with <xhtml:link> alternates for every locale\n<loc> uses the default-locale (clean) URL; x-default also points there\nFull XML example with static and dynamic pages\nNext.js App Router sitemap.ts implementation pattern\nWhat to include vs. exclude (admin/API routes excluded)\nHreflang language code format rules\nQuick Checklist — Adding a New Feature with i18n\nAdd translation keys to all locale JSON files in src/app/[lang]/dictionaries/\nAdd English first, then translate to all other languages naturally\nServer components: const dict = await getDictionary(locale) → dict?.page?.section?.key || 'fallback'\nClient components: const dict = useDictionary() → same fallback pattern\nAdd generateMetadata() to the page file, calling generateAlternatesMetadata()\nAdd JSON-LD structured data script tag with translated fields and inLanguage\nUpdate sitemap if the page is new: add it to the sitemap source (see references/sitemap.md)\nUse <LocalizedLink> for internal links and getLocalizedPath() for programmatic navigation\nQuick Checklist — Adding a New Locale\nAdd locale code to locales array in src/lib/i18n/locales.ts\nAdd locale entry to dictionaries/ as <code>.json (full translation of en.json)\nAdd entry in src/app/[lang]/dictionaries.ts import map\nAdd display name in LanguageSwitcher languageNames map\nSync the sitemap locale list with the app's locales array\nRegenerate / redeploy the sitemap"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/javainthinking/web-i18n-nextjs",
    "publisherUrl": "https://clawhub.ai/javainthinking/web-i18n-nextjs",
    "owner": "javainthinking",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "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"
  }
}