i18n/zh-TW/i18n-localization/SKILL.md
國際化與在地化模式。偵測寫死字串、管理翻譯、語系檔案、RTL 支援。
npx skillsauth add tai-ch0802/skills-bundle i18n-localizationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
國際化(i18n)與在地化(L10n)最佳實踐。
| 術語 | 意義 | |------|------| | i18n | 國際化 — 讓應用程式可翻譯 | | L10n | 在地化 — 實際翻譯 | | Locale | 語言 + 地區(en-US、zh-TW)| | RTL | 右至左語言(阿拉伯語、希伯來語)|
| 專案類型 | 需要 i18n? | |----------|-------------| | 公開 Web 應用 | ✅ 是 | | SaaS 產品 | ✅ 是 | | 內部工具 | ⚠️ 可能 | | 單一地區應用 | ⚠️ 考慮未來 | | 個人專案 | ❌ 選擇性 |
import { useTranslation } from 'react-i18next';
function Welcome() {
const { t } = useTranslation();
return <h1>{t('welcome.title')}</h1>;
}
import { useTranslations } from 'next-intl';
export default function Page() {
const t = useTranslations('Home');
return <h1>{t('title')}</h1>;
}
from gettext import gettext as _
print(_("Welcome to our app"))
locales/
├── en/
│ ├── common.json
│ ├── auth.json
│ └── errors.json
├── zh-TW/
│ ├── common.json
│ ├── auth.json
│ └── errors.json
└── ar/ # RTL
└── ...
| 問題 | 解決方案 | |------|----------| | 缺少翻譯 | 備援到預設語言 | | 寫死字串 | 使用 linter/檢查腳本 | | 日期格式 | 使用 Intl.DateTimeFormat | | 數字格式 | 使用 Intl.NumberFormat | | 複數形 | 使用 ICU 訊息格式 |
/* CSS 邏輯屬性 */
.container {
margin-inline-start: 1rem; /* 不是 margin-left */
padding-inline-end: 1rem; /* 不是 padding-right */
}
[dir="rtl"] .icon {
transform: scaleX(-1);
}
發布前:
| 腳本 | 用途 | 指令 |
|------|------|------|
| scripts/i18n_checker.py | 偵測寫死字串和缺少的翻譯 | python scripts/i18n_checker.py <project_path> |
development
Unified testing skill — TDD workflow, unit/integration patterns, E2E/Playwright strategies. Replaces tdd-workflow + testing-patterns + webapp-testing.
testing
Security-first skill vetting for AI agents. Use before installing any skill from ClawdHub, GitHub, or other sources. Checks for red flags, permission scope, and suspicious patterns.
development
Spec-Driven Development (SDD): A structured workflow (Requirement -> Analysis -> Implementation) enforcing explicit documentation before coding.
development
Methodologies for System Analysis (SA), focusing on technical architecture, data flow modeling, and API design.