
This automates the grunt work of adding i18n to your codebase by scanning for hardcoded strings, generating locale files in the right format for your framework (react-intl, vue-i18n, i18next, gettext, etc.), and replacing text with translation calls. It's smart enough to skip variable names and import paths while flagging actual UI text, and it'll check translation completeness across languages so you know what's missing. The workflow is straightforward: it detects your project type, extracts strings, generates properly formatted locale files, rewrites your code with translation functions, and reports on coverage. Saves hours of manual find-and-replace when internationalizing an existing app, though you'll still need to review the automated replacements to make sure context is preserved.
$ npx -y skills add laolaoshiren/claude-code-skills-zh --skill i18n-helper --agent claude-codeInstalls into .claude/skills of the current project.
当用户要求以下操作时激活此技能:
.js/.jsx/.ts/.tsx/.vue/.py/.java/.go 等文件中搜索硬编码字符串根据项目框架生成对应格式:
{ "key": "value" }key: valuekey=value// 替换前
alert('保存成功');
// 替换后
alert(t('alert.saveSuccess'));
## 📊 i18n 扫描报告
### 硬编码文本
| 文件 | 行号 | 内容 | 建议 key |
|------|------|------|----------|
| src/App.tsx | 42 | '欢迎使用' | page.welcome |
### 语言文件
已生成 `locales/zh-CN.json` 和 `locales/en-US.json`
### 翻译完整性
- zh-CN: 45/45 (100%) ✅
- en-US: 42/45 (93.3%) ⚠️ 缺少 3 个 key
{name} {{count}} %s 等格式Sponsors