AI Commands for Auditing & Wrapping i18n Strings
Your codebase has 500 hardcoded strings scattered across components, templates, and views. Manual wrapping takes days of tedious find-and-replace work. Even after wrapping, you still miss split sentences that break in German, plural logic that fails in Arabic, and orphaned keys that bloat your locale files.
Two AI slash commands that handle the entire i18n workflow. Run /i18n-review to audit your code read-only, then run /i18n-wrap to fix everything automatically. Both commands detect your framework, understand your locale file format, and validate changes before committing.
Read-only audit that finds split sentences, broken plurals, unwrapped strings, and unused keys. Never modifies your code.
Auto-wraps hardcoded strings with the correct translation function, generates semantic keys, updates locale files, and validates the build.
The review command performs a read-only audit of your codebase. It scans every file for i18n issues and produces a prioritized report with exact file locations and fix suggestions. Your code is never modified.
/i18n-review src/
/i18n-review src/ --framework=next-intlThe wrap command automatically wraps hardcoded strings with the correct translation function for your framework. It detects your i18n library, generates semantic keys grouped by component or feature, updates your locale files, and validates that the build still passes.
/i18n-wrap src/components/
/i18n-wrap src/ --framework=react-i18nextBoth commands auto-detect your framework from your project dependencies. You can also specify it explicitly with the --framework flag. Here are the 10 supported frameworks with their translation functions and plural formats.
| Framework | Translation Function | Plural Format |
|---|---|---|
| react-i18next | t() | key_one / key_other |
| next-intl | t() | ICU {count, plural, ...} |
| vue-i18n | $t() | Pipe syntax | singular | plural |
| angular i18n | $localize | ICU {count, plural, ...} |
| svelte-i18n | $_() | ICU {count, plural, ...} |
| flutter intl | S.of(context) | Intl.plural() |
| django | gettext / _() | ngettext() |
| rails i18n | t() | count key |
| laravel | __() / @lang | trans_choice() |
| swift | NSLocalizedString | .stringsdict |
Copy the command files to your .claude/commands/ directory. That's it — no dependencies, no configuration. The commands are plain Markdown files that any AI coding assistant can execute.
mkdir -p .claude/commands
cp commands/i18n-review.md .claude/commands/
cp commands/i18n-wrap.md .claude/commands/Review a React app using react-i18next, then wrap all hardcoded strings. The commands detect react-i18next from your package.json and use the correct t() function and key_one/key_other plural format.
# Review a React project for i18n issues
/i18n-review src/ --framework=react-i18next
# Wrap all hardcoded strings automatically
/i18n-wrap src/components/ --framework=react-i18next
# Result: t() calls inserted, keys added to en/translation.jsonAudit Django templates and views for i18n issues, then wrap strings with gettext. The commands detect Django from your settings.py and use _() for simple strings and ngettext() for plurals.
# Review Django templates and views
/i18n-review myapp/ --framework=django
# Wrap hardcoded strings with gettext
/i18n-wrap myapp/templates/ --framework=django
# Result: _() calls inserted, .po file updatedDrop your translation file here
JSON, YAML, PO, XML, CSV, Markdown, Properties
or click to browse
Target languages