ablevarghese/ios-claude-toolkit/babel-localization
Claude Code and agent skill by ablevarghese/ios-claude-toolkit
- community
Checking that the SKILL.md file is still in the repository.
Translate, Spanish, German, multiple languages, format currency for different countries. iOS string localization, currency formatting, date formatting, and pluralization rules. Trigger on: 'add French support', 'localize this screen', 'format money for Europe', 'date looks wrong in Japan', 'RTL layout', 'Arabic support', i18n, l10n, String Catalog, Localizable.strings, stringsdict, or any work making the app usable in multiple languages or regions. For localizing accessibility labels specifically, also see athena-accessibility.
Install
npx vskill@latest install ablevarghese/ios-claude-toolkit/babel-localizationSKILL.md
The same SKILL.md was published earlier as ablevarghese/ios-claude-toolkit/babel-localization.
Localization & Internationalization
Iron Law: "Every user-visible string must come from a localization file. Hardcoded strings are bugs."
Project Discovery: Before executing, determine project-specific values (project name, scheme, bundle ID, target) from project configuration files (CLAUDE.md, project.yml, .xcodeproj, Package.swift). Identify supported locales and currencies from the project's Localizable.strings files, .xcstrings files, lproj directories, and domain configuration.
Handle all localization for iOS apps: manage String Catalogs (.xcstrings) or legacy Localizable.strings, format currencies for multiple regions, format dates with timezone awareness, implement pluralization rules, support RTL languages, and enable dynamic locale switching.
Supported Locales
Structure your locale support based on your app's target markets. Example layout:
| Locale | Currency | Status | |
|---|---|---|---|
| en-US | USD | Primary | |
| en-GB | GBP | Example | |
| de-DE | EUR | Example | |
| fr-FR | EUR | Example | |
| es-MX | MXN | Example |
Adapt this table to your project's actual supported locales and currencies.
Rationalizations (Do Not Skip)
| Rationalization | Why It's Wrong | Required Action | |
|---|---|---|---|
| "We only support English" | 37% of iOS users use non-English locales. Even English-only apps need locale-aware formatting for dates, numbers, and currencies. A user in the UK sees $1,234.56 and doesn't know if it's USD or their local currency. | Use Locale.current for all formatting. Externalize strings even for English-only so the infrastructure exists when you expand. | |
| "I'll localize later" | Retrofitting localization is 5-10x more expensive than building it in. String concatenation, hardcoded formats, and layout assumptions compound into weeks of rework. | Use String Catalogs from day one. Every string goes through localization infrastructure. No exceptions. | |
| "NSLocalizedString is enough" | NSLocalizedString requires manual key management, has no compile-time verification, and doesn't support String Catalog features like automatic extraction, state tracking, or plural/device variations. | Use String Catalogs (.xcstrings) for new projects. Use String(localized:) in Swift code. | |
| "RTL is an edge case" | Arabic and Hebrew represent 400M+ native speakers. RTL isn't rare, it's one of the two fundamental layout directions. And your layout will break in ways you never tested. | Use .leading/.trailing instead of .left/.right. Test with RTL pseudo-localization. Never assume text flows left-to-right. | |
| "Format strings are fine for building sentences" | Grammar differs across languages. English says "5 items in 3 folders" but German rearranges word order. Concatenating localized fragments produces gibberish. | Use complete sentences with format specifiers: "items_in_folders" = "%1$d items in %2$d folders". Let translators reorder arguments. | |
| "Date formatting with fixed format strings works" | "MM/dd/yyyy" is incomprehensible in most of the world. Even DateFormatter with a custom format ignores the user's locale preferences. | Use Date.FormatStyle or DateFormatter with .dateStyle/.timeStyle. Never hardcode date format patterns for user-visible dates. | |
| "I'll use Google Translate for other languages" | Machine translation misses context, tone, legal implications, and cultural norms. "Wire $500" machine-translated could imply physical wire, not money transfer. | Use professional translators. Budget for it. Machine translation is acceptable only for initial pseudo-localization testing. |
Red Flags -- STOP
- Hardcoded strings in SwiftUI views:
Text("Submit")instead ofText("submit_button", tableName: "Actions")orText(String(localized: "submit_button"))-- this is a localization bug, not a shortcut. - String concatenation for localized text:
greeting + " " + userName-- languages have different word orders. Use format strings:String(localized: "greeting_format \(userName)"). - Missing pluralization rules: Using
"\(count) items"instead of stringsdict/String Catalog plural rules. Languages like Arabic have 6 plural forms (zero, one, two, few, many, other). - Hardcoded date/number formats:
"MM/dd/yyyy"or manual decimal separators. Always useFormatStyleor locale-aware formatters. - `.frame` with fixed widths on text: German text is 30-40% longer than English. Fixed-width frames cause truncation in other locales.
- Using `.left`/`.right` instead of `.leading`/`.trailing`: Breaks RTL layouts entirely.
When NOT to Use This Skill
- Internal developer tools or debug screens: Strings only developers see don't need localization infrastructure. But if end users might ever see it, localize it.
- Log messages and analytics event names: These are machine-consumed, not user-visible. Use English constants. (But user-visible error messages derived from these DO need localization.)
- Unit test assertions: Test strings are developer-facing. Use raw strings in tests.
- Server-side string formatting: If the server returns localized strings, localization belongs in the server codebase, not the iOS app. The app should pass the user's locale to the server.
Decision Framework
String Catalogs (.xcstrings) -- Modern Approach
String Catalogs are the modern replacement for Localizable.strings, introduced in Xcode 15. They provide automatic string extraction, state tracking, plural/device variations, and a visual editor.
Setting Up String Catalogs
- In Xcode: File > New > File > String Catalog
- Name it
Localizable.xcstrings(default table) or a custom name - Xcode automatically extracts strings from
Text(),String(localized:), andLocalizedStringResource - Manage translations, plurals, and device variations in the visual editor
Using String Catalogs in Code
Plural Variations in String Catalogs
In the String Catalog editor, select a key and add a "Plural" variation. Xcode provides fields for: zero, one, two, few, many, other. Each language only needs the categories that apply to its grammar.
Legacy Localizable.strings (Existing Projects)
Adding Localized Strings
Pluralization with stringsdict
RTL Language Support
RTL support is not optional if you target Arabic, Hebrew, Persian, or Urdu markets.
Layout Mirroring
Text Alignment
Image and Icon Mirroring
Testing RTL
In the scheme editor: Edit Scheme > Run > Options > Application Language > "Right-to-Left Pseudolanguage". This forces RTL layout without needing an actual Arabic translation.
Currency Formatting
Money Formatting Guidelines
Adapt the formatting examples above to your project's supported currencies and locales.
Currency Enum Pattern
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/babel-localization/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ablevarghese/ios-claude-toolkit/babel-localization)