Token导航 LogoToken导航TokenDH.com
效率需要联网clawhub未标认证来源可访问clear审计提醒

web-i18n-nextjsWEB i18n Next.js 效率

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

16,871

周安装

696

GitHub Stars

公开资料未说明

下载量

5,512
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:web-i18n-nextjs(WEB i18n Next.js 效率)
来源仓库:https://github.com/javainthinking/web-i18n-nextjs
安装命令:
openclaw skills install web-i18n-nextjs
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install web-i18n-nextjs

简介

Next.js App Router应用的国际化(i18n)开发指南。

  • 涵盖翻译文件结构、区域路由与SEO元数据处理。
  • 帮助构建多语言站点并保持代码可维护性。
  • 需配合实际项目目录结构调整配置参数。适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。
  • web-i18n-nextjs 属于效率类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
i18n-nextjs
description
>

i18n for Next.js — Implementation Guide

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

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

- Add English first, then translate to all other languages naturally

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

Quick Checklist — Adding a New Locale

  1. Add locale code to locales array in src/lib/i18n/locales.ts
  2. Add locale entry to dictionaries/ as <code>.json (full translation of en.json)
  3. Add entry in src/app/[lang]/dictionaries.ts import map
  4. Add display name in LanguageSwitcher languageNames map
  5. Sync the sitemap locale list with the app's locales array
  6. Regenerate / redeploy the sitemap

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

90.89%
按下载量换算5,010

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills