localization · johnrogers — Claude Code skill: what it does, how to install
Walks the agent through iOS localization: String Catalogs, plural forms, locale-aware formats and right-to-left layout.
MIT ★ 233 updated 2026-01-18
/plugin marketplace add johnrogers/claude-swift-engineering
/plugin install swift-engineering@claude-swift-engineeringWhat localization does
The skill covers localization for iOS apps built on String Catalogs (.xcstrings): translated strings, plural variants, date and number formats, right-to-left layouts. Four reference files ship with it — string-catalogs.md, pluralization.md, formatting.md, rtl-support.md. The agent is told to load them whenever the topic might come up.
The workflow starts with creating a catalog in Xcode, then marking strings with String(localized:comment:) or letting SwiftUI extract them, adding plural variants in the editor, testing under pseudo-localization, and exporting files for translators. Two build settings matter here: compiler-based extraction of Swift strings, and preferring String Catalogs.
One mistake bites hardest. Forget the Localize checkbox in the File Inspector and the catalog stays out of Copy Bundle Resources, so the app keeps showing its original English text. Pseudo-localization catches the rest: German and Chinese pseudo-locales expose clipped labels, and Arabic shows whether the layout actually flipped or hardcoded directions stayed put.
What it helps with
- create a String Catalog and move existing strings into it
- mark strings with a comment a translator can use
- add plural variants for languages with several plural forms
- format dates and currency the way the locale expects
- find clipped labels before paying for translation
Example prompts for the agent
- Add a String Catalog to the project and move every string out of
SettingsView.swift. - Why does the app still show English after I added the
.xcstringsfile? - Run the app with pseudo-localization and list the labels that get clipped.
How to install localization
1Plugin marketplace
/plugin marketplace add johnrogers/claude-swift-engineering/plugin install swift-engineering@claude-swift-engineeringThis installs the whole swift-engineering plugin with all its skills
2Skills CLI (Vercel)
npx skills add johnrogers/claude-swift-engineering --skill localization -a claude-code3Manually: put the files in place
~/.claude/skills/localization/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/localization/
1Skills CLI (Vercel)
npx skills add johnrogers/claude-swift-engineering --skill localization -a codex2Manually: put the files in place
.agents/skills/localization/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add johnrogers/claude-swift-engineering --skill localization -a cursor2Manually: put the files in place
.cursor/skills/localization/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install johnrogers/claude-swift-engineering plugins/swift-engineering/skills/localization2Manually: put the files in place
.github/skills/localization/SKILL.md1Skills CLI (Vercel)
npx skills add johnrogers/claude-swift-engineering --skill localization -a gemini-cli2Platform CLI
gemini skills install https://github.com/johnrogers/claude-swift-engineering --path plugins/swift-engineering/skills/localizationManually: put the files in place
.devin/skills/localization/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about localization
How do I install localization in Claude Code?
Through the plugin marketplace: run /plugin marketplace add johnrogers/claude-swift-engineering, then /plugin install swift-engineering@claude-swift-engineering.
What does localization do?
It gives the agent a workflow for String Catalogs, plural forms and right-to-left layout in iOS projects, plus a list of mistakes that break extraction or hide translated text.
Does it cover right-to-left languages?
Yes, rtl-support.md deals with semantic directions. Testing with Arabic set as the system language is how it suggests verifying the result.
Source text
SKILL.md · MIT
---
name: localization
description: Use when implementing internationalization (i18n), String Catalogs, pluralization, or right-to-left layout support. Covers modern localization workflows with Xcode String Catalogs and LocalizedStringKey patterns.
---
# Localization
Modern iOS localization using String Catalogs (.xcstrings) for managing translations, plural forms, and locale-aware content. Supports SwiftUI's LocalizedStringKey and String(localized:) APIs.
## Reference Loading Guide
**ALWAYS load reference files if there is even a small chance the content may be required.** It's better to have the context than to miss a pattern or make a mistake.
| Reference | Load When |
|-----------|-----------|
| **[String Catalogs](references/string-catalogs.md)** | Setting up or using Xcode 15+ String Catalogs |
| **[Pluralization](references/pluralization.md)** | Handling plural forms, stringsdict migration |
| **[Formatting](references/formatting.md)** | Date, number, currency locale-aware formatting |
| **[RTL Support](references/rtl-support.md)** | Right-to-left layouts, semantic directions |
## Core Workflow
1. Create String Catalog in Xcode (File > New > String Catalog)
2. Mark strings with `String(localized:comment:)` or use SwiftUI's automatic extraction
3. Add plural variants in String Catalog editor where needed
4. Test with pseudo-localization (Scheme > Run > Options > App Language)
5. Export for translation (File > Export Localizations)
## Key Patterns
```swift
// SwiftUI - automatic localization
Text("Welcome")
Button("Continue") { }
// Explicit localization with context
let title = String(localized: "Settings", comment: "Navigation title")
// Deferred localization for custom views
struct CardView: View {
let title: LocalizedStringResource
var body: some View { Text(title) }
}
```
## Build Settings
- **Use Compiler to Extract Swift Strings**: Yes
- **Localization Prefers String Catalogs**: Yes
## Common Mistakes
1. **Forgetting String Catalog in Build Phases** — Adding String Catalog but forgetting to check "Localize" in File Inspector means it's not embedded. Always verify in Build Phases > Copy Bundle Resources.
2. **Pseudo-localization not tested** — Not running your app with pseudo-localization (German/Chinese pseudo-locale) means you miss text overflow and RTL issues. Always test with pseudo-localization before translation.
3. **Hardcoded strings anywhere** — Even one hardcoded string outside the String Catalog breaks extraction and automation. Use `String(localized:)` everywhere or use `LocalizedStringResource` for deferred localization.
4. **Context loss in translations** — Providing no comment for translators means they guess context and get it wrong. Add comments explaining where the string appears and what it means.
5. **RTL layouts not tested** — Assuming LTR layout works for RTL languages (Arabic, Hebrew) fails miserably. Test with system language set to Arabic and verify semantic directions are used.
© John Rogers (@johnrogers) · MIT · johnrogers/claude-swift-engineering
Similar skills
All skills for Mobile →localization by other authors comes first.