i18n-frontend-implementer by patricio0312rev/skills
npx skills add https://github.com/patricio0312rev/skills --skill i18n-frontend-implementer使用 next-intl、react-i18next 或类似库实现国际化。
1. 安装 : npm install next-intl 或 react-i18next 2. 创建字典 : locales/en.json、locales/es.json 3. 提供者设置 : 使用 IntlProvider 包装应用 4. 翻译键 : 分层命名空间结构 5. 格式化器 : 日期、数字、货币格式化 6. 语言切换器 : 下拉菜单或国旗 UI
{
"common": { "nav": { "home": "Home", "about": "About" } },
"auth": { "login": "Sign In", "logout": "Sign Out" },
"errors": { "required": "{field} is required" }
}
const t = useTranslations('common');
<h1>{t('nav.home')}</h1>
// 使用复数形式
t('items', { count: 5 }) // "5 items"
// 使用格式化
<p>{formatDate(date, { dateStyle: 'long' })}</p>
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
使用命名空间进行组织,将所有文本提取到翻译文件中,正确处理复数形式,根据区域设置格式化日期/数字,提供语言切换器,支持从右到左语言,懒加载翻译。
每周安装次数
110
代码仓库
GitHub 星标数
20
首次出现
2026年1月24日
安全审计
已安装于
gemini-cli101
opencode100
codex99
cursor95
github-copilot94
cline85
Implement internationalization with next-intl, react-i18next, or similar libraries.
1. Install : npm install next-intl or react-i18next 2. Create dictionaries : locales/en.json, locales/es.json 3. Provider setup : Wrap app with IntlProvider 4. Translation keys : Hierarchical namespace structure 5. Formatters : Date, number, currency formatting 6. Language switcher : Dropdown or flags UI
{
"common": { "nav": { "home": "Home", "about": "About" } },
"auth": { "login": "Sign In", "logout": "Sign Out" },
"errors": { "required": "{field} is required" }
}
const t = useTranslations('common');
<h1>{t('nav.home')}</h1>
// With plurals
t('items', { count: 5 }) // "5 items"
// With formatting
<p>{formatDate(date, { dateStyle: 'long' })}</p>
Use namespaces for organization, extract all text to translations, handle plurals properly, format dates/numbers per locale, provide language switcher, support RTL languages, lazy-load translations.
Weekly Installs
110
Repository
GitHub Stars
20
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli101
opencode100
codex99
cursor95
github-copilot94
cline85
TanStack Table 中文指南:React 无头表格库,实现排序过滤分页
500 周安装