skills/i18n/SKILL.md
Internationalization & localization skill. String extraction, translation workflows, pluralization, date/number/currency formatting, RTL support, character set validation. Triggers on: /godmode:i18n, "internationalize", "translate", "RTL support".
npx skillsauth add arbazkhan971/godmode i18nInstall 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.
/godmode:i18n# Detect i18n library
grep -l "react-intl\|react-i18next\|vue-i18n\|\
next-intl" package.json 2>/dev/null
# Find locale files
find . -path "*/locales/*" -o -path "*/l10n/*" \
| head -10
# Count hardcoded strings in components
grep -rn ">[A-Z][a-z].*</" src/ --include="*.tsx" \
--include="*.jsx" | wc -l
I18N AUDIT:
Framework: <React/Vue/Angular>
Library: <react-i18next | vue-i18n | none>
Hardcoded strings: <N>
Locale files: <N> locales configured
RTL needed: <YES if ar/he/fa/ur in targets>
IF no library: install react-i18next (React) or
vue-i18n (Vue)
IF hardcoded > 50: batch extract by component
IF RTL needed: audit CSS for physical properties
| Stack | Library | Features |
|---------|---------------|-------------------|
| React | react-i18next | Hooks, ICU format |
| Vue | vue-i18n | Directives, SFC |
| Angular | @angular/localize | Built-in, AOT |
| Next.js | next-intl | App Router, SSR |
For each hardcoded string:
<namespace>.<section>.<meaning>PLURAL CATEGORIES BY LOCALE:
English: one, other
French: one, many, other
Arabic: zero, one, two, few, many, other
Polish: one, few, many, other
Japanese: other (no distinction)
USE ICU MessageFormat:
"{count, plural,
=0 {No items}
one {# item}
other {# items}
}"
NEVER use: count === 1 ? "item" : "items"
(breaks for most non-English languages)
FORMATTING RULES:
Dates: Intl.DateTimeFormat(locale, options)
Numbers: Intl.NumberFormat(locale)
Currency: Intl.NumberFormat(locale,
{ style: 'currency', currency })
EXAMPLES:
en-US: 03/15/2025, 1,234.56, $1,234.56
de-DE: 15.03.2025, 1.234,56, 1.234,56 EUR
ja-JP: 2025/03/15, 1,234, JPY1,235
NEVER hardcode: $, comma separators, date formats
ALWAYS use: Intl APIs with explicit locale param
CSS LOGICAL PROPERTIES (preferred):
margin-left → margin-inline-start
padding-right → padding-inline-end
text-align: left → text-align: start
float: left → use flexbox instead
left: 10px → inset-inline-start: 10px
HTML: <html dir="rtl" lang="ar">
ICONS: Mirror arrows (→ becomes ←).
Do NOT mirror: play, clock, checkmarks.
IF any target locale is RTL: audit EVERY layout
CHECKS:
[ ] DB uses UTF-8 (utf8mb4 for MySQL)
[ ] API sets charset=utf-8
[ ] Forms accept multi-byte (CJK, emoji)
[ ] String length uses grapheme clusters
[ ] Sorting uses Intl.Collator
[ ] Truncation preserves multi-byte chars
THRESHOLDS:
"cafe\u0301" = 4 graphemes but 5 code points
"family emoji" = 1 grapheme but 7 code points
IF length calc wrong: visible truncation bugs
WORKFLOW:
1. Dev adds key + en-US value + context note
2. Export to exchange format (XLIFF, JSON)
3. Translate via TMS (Crowdin, Lokalise) or
machine + human review
4. Import, validate: completeness, placeholders,
HTML balance, length
5. QA: pseudo-localization catches 90% of bugs
THRESHOLDS:
Coverage < 80%: CRITICAL — visible untranslated text
Coverage 80-95%: WARNING — edge cases missing
Coverage > 95%: PASS
TEST PLAN:
1. Pseudo-localization: pad 30-40%, accented chars
2. RTL layout: mirror, bidirectional text
3. Locale formatting: dates, numbers, currency
4. Pluralization: test 0, 1, 2, 5, 21, 100
5. Edge cases: long translations (German),
short (CJK), emoji, mixed scripts
I18N AUDIT — <project>
Strings extracted: <N>/<total>
Locales: <list>, Coverage: <N>%
Pluralization: <N> rules, RTL: <READY|NOT STARTED>
Character set: <PASS|ISSUES>
Commit: "i18n: extract <N> strings to resource files"
Never ask to continue. Loop autonomously until done.
1. Library: react-intl, react-i18next, vue-i18n
2. Locale files: src/locales/, public/locales/
3. Base locale: package.json defaultLocale
4. RTL need: target locales include ar, he, fa, ur
5. Intl API usage: grep for Intl.DateTimeFormat
WHILE current_pass < 3:
RUN checks: coverage, locale tests, RTL
FIX CRITICAL items before next pass
IF coverage >= 95% AND locale_tests_pass
AND rtl_clean: BREAK
Thresholds: <80% CRITICAL, 80-95% WARN, >95% PASS
Print: i18n: {N} locales, {keys} keys, coverage {avg}%. RTL: {status}. Verdict: {verdict}.
STEP LOCALE COVERAGE_PCT STATUS
KEEP if: all locales render AND no missing keys
AND fallback works
DISCARD if: missing keys at runtime OR formatting
errors OR RTL layout breaks
STOP when ALL of:
- All visible strings extracted to locale files
- Fallback chain tested
- Pluralization correct for all target locales
- CI check validates no missing keys
<!-- tier-3 -->
development
Web performance optimization. Lighthouse, bundle analysis, code splitting, image optimization, critical CSS, fonts, service workers, CDN.
development
Webhook design, delivery, retry, HMAC verification, event subscriptions, dead letter queues.
development
Vue.js mastery. Composition API, Pinia, Vue Router, Nuxt SSR/SSG, Vite optimization, testing.
development
Evidence gate. Run command, read full output, confirm or deny claim. No trust, only proof.