# I18n Helper

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-sourav15mukherjee-skillforge-free-skills-i18n-helper`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [sourav15mukherjee](https://agentstack.voostack.com/s/sourav15mukherjee)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [sourav15mukherjee](https://github.com/sourav15mukherjee)
- **Source:** https://github.com/sourav15mukherjee/skillforge-free-skills/tree/main/i18n-helper

## Install

```sh
agentstack add skill-sourav15mukherjee-skillforge-free-skills-i18n-helper
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## i18n/Localization Helper

Extract hardcoded strings, generate locale files, and validate translation completeness across languages.

## Workflow

1. **Detect the i18n framework in use**
   ```bash
   grep -E "i18next|react-intl|vue-i18n|next-intl|@formatjs" package.json 2>/dev/null
   ```
   Check for config files: `i18n.ts`, `next.config.js` with i18n key, `src/locales/`.
   If no framework found, recommend one and help set it up.

2. **Discover existing locale files**
   ```bash
   find . -maxdepth 4 \( -name "*.json" -o -name "*.yaml" \) -path "*/locale*" -o -path "*/i18n/*" -o -path "*/translations/*" | grep -v node_modules
   ```
   Parse each file, build key inventory per language. Note structure: flat vs nested keys.

3. **Scan source code for hardcoded strings**
   Find user-facing strings in JSX text, component props, toast/alert calls, page titles, form validation messages.
   Exclude: CSS classes, console.log, import paths, test strings, URLs.

4. **Generate translation keys**
   Naming convention: `page.section.element`
   ```
   "Welcome back"     → common.welcomeBack
   "Submit"           → common.buttons.submit
   "Email is required" → forms.validation.emailRequired
   ```

5. **Extract and update source code**
   Replace hardcoded strings with translation calls:
   ```tsx
   // Before
   Welcome back

   // After (i18next)
   const { t } = useTranslation();
   {t("common.welcomeBack")}
   ```

6. **Generate or update locale files**
   Create JSON/YAML for each language. Non-primary languages get placeholders:
   ```json
   { "common": { "welcomeBack": "[ES] Welcome back" } }
   ```

7. **Validate locale completeness**
   ```
   en.json:  142/142 keys (100%)
   es.json:  128/142 keys (90.1%) — 14 missing
   fr.json:  135/142 keys (95.1%) — 7 missing
   ```

8. **Find unused translation keys**
   Report keys in locale files never referenced in source code.

## Rules

- Never modify non-primary locale files without user confirmation
- Preserve existing key structure and ordering
- Mark placeholder translations with `[TODO]` or `[LANG]` prefix
- Do not extract developer-facing strings (logs, error codes)
- Handle pluralization using the framework's syntax
- Handle interpolation: `"Hello, {{name}}"` not string concatenation
- Process one file at a time, show changes before applying
- Sort keys alphabetically within namespaces

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [sourav15mukherjee](https://github.com/sourav15mukherjee)
- **Source:** [sourav15mukherjee/skillforge-free-skills](https://github.com/sourav15mukherjee/skillforge-free-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-sourav15mukherjee-skillforge-free-skills-i18n-helper
- Seller: https://agentstack.voostack.com/s/sourav15mukherjee
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
