{
  "schema": "https://ai-atoms.com/schemas/skill-v1.json",
  "type": "skill",
  "id": "skill/i18n-localization",
  "version": "1.0.0",
  "name": "I18N Localization",
  "description": "Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.",
  "system_prompt_fragment": "# i18n & Localization\n\n> Internationalization (i18n) and Localization (L10n) best practices.\n\n---\n\n## 1. Core Concepts\n\n| Term | Meaning |\n|------|---------|\n| **i18n** | Internationalization - making app translatable |\n| **L10n** | Localization - actual translations |\n| **Locale** | Language + Region (en-US, tr-TR) |\n| **RTL** | Right-to-left languages (Arabic, Hebrew) |\n\n---\n\n## 2. When to Use i18n\n\n| Project Type | i18n Needed? |\n|--------------|--------------|\n| Public web app | ✅ Yes |\n| SaaS product | ✅ Yes |\n| Internal tool | ⚠️ Maybe |\n| Single-region app | ⚠️ Consider future |\n| Personal project | ❌ Optional |\n\n---\n\n## 3. Implementation Patterns\n\n### React (react-i18next)\n\n```tsx\nimport { useTranslation } from 'react-i18next';\n\nfunction Welcome() {\n  const { t } = useTranslation();\n  return <h1>{t('welcome.title')}</h1>;\n}\n```\n\n### Next.js (next-intl)\n\n```tsx\nimport { useTranslations } from 'next-intl';\n\nexport default function Page() {\n  const t = useTranslations('Home');\n  return <h1>{t('title')}</h1>;\n}\n```\n\n### Python (gettext)\n\n```python\nfrom gettext import gettext as _\n\nprint(_(\"Welcome to our app\"))\n```\n\n---\n\n## 4. File Structure\n\n```\nlocales/\n├── en/\n│   ├── common.json\n│   ├── auth.json\n│   └── errors.json\n├── tr/\n│   ├── common.json\n│   ├── auth.json\n│   └── errors.json\n└── ar/          # RTL\n    └── ...\n```\n\n---\n\n## 5. Best Practices\n\n### DO ✅\n\n- Use translation keys, not raw text\n- Namespace translations by feature\n- Support pluralization\n- Handle date/number formats per locale\n- Plan for RTL from the start\n- Use ICU message format for complex strings\n\n### DON'T ❌\n\n- Hardcode strings in components\n- Concatenate translated strings\n- Assume text length (German is 30% longer)\n- Forget about RTL layout\n- Mix languages in same file\n\n---\n\n## 6. Common Issues\n\n| Issue | Solution |\n|-------|----------|\n| Missing translation | Fallback to default language |\n| Hardcoded strings | Use linter/checker script |\n| Date format | Use Intl.DateTimeFormat |\n| Number format | Use Intl.NumberFormat |\n| Pluralization | Use ICU message format |\n\n---\n\n## 7. RTL Support\n\n```css\n/* CSS Logical Properties */\n.container {\n  margin-inline-start: 1rem;  /* Not margin-left */\n  padding-inline-end: 1rem;   /* Not padding-right */\n}\n\n[dir=\"rtl\"] .icon {\n  transform: scaleX(-1);\n}\n```\n\n---\n\n## 8. Checklist\n\nBefore shipping:\n\n- [ ] All user-facing strings use translation keys\n- [ ] Locale files exist for all supported languages\n- [ ] Date/number formatting uses Intl API\n- [ ] RTL layout tested (if applicable)\n- [ ] Fallback language configured\n- [ ] No hardcoded strings in components\n\n---\n\n## Script\n\n| Script | Purpose | Command |\n|--------|---------|---------|\n| `scripts/i18n_checker.py` | Detect hardcoded strings & missing translations | `python scripts/i18n_checker.py <project_path>` |\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.",
  "applicable_domains": [
    "other"
  ],
  "category": "other",
  "invocation": [
    "/i18n-localization"
  ],
  "authored_by": "claudeskills.in community",
  "source_url": "https://claudeskills.in/skill/i18n-localization",
  "provenance": {
    "source": "claudeskills.in",
    "source_url": "https://claudeskills.in/skill/i18n-localization",
    "license": "unknown",
    "imported_at": "2026-09-03",
    "notes": "Aggregated by claudeskills.in from community GitHub lists."
  },
  "tags": [
    "claudeskills",
    "other"
  ],
  "lifecycle": "draft"
}