axiom-localization
Use when localizing apps, using String Catalogs, generating type-safe symbols (Xcode 26+), handling plurals, RTL layouts, locale-aware formatting, or migrating from .strings files - comprehensive i18n patterns for Xcode 15-26
Install
mkdir -p .claude/skills/axiom-localization && curl -L -o skill.zip "https://mcp.directory/api/skills/download/5087" && unzip -o skill.zip -d .claude/skills/axiom-localization && rm skill.zipInstalls to .claude/skills/axiom-localization
About this skill
Localization & Internationalization
Comprehensive guide to app localization using String Catalogs. Apple Design Award Inclusivity winners always support multiple languages with excellent RTL (Right-to-Left) support.
Overview
String Catalogs (.xcstrings) are Xcode 15's unified format for managing app localization. They replace legacy .strings and .stringsdict files with a single JSON-based format that's easier to maintain, diff, and integrate with translation workflows.
This skill covers String Catalogs, SwiftUI/UIKit localization APIs, plural handling, RTL support, locale-aware formatting, and migration strategies from legacy formats.
When to Use This Skill
- Setting up String Catalogs in Xcode 15+
- Localizing SwiftUI and UIKit apps
- Handling plural forms correctly (critical for many languages)
- Supporting RTL languages (Arabic, Hebrew)
- Formatting dates, numbers, and currencies by locale
- Migrating from legacy
.strings/.stringsdictfiles - Preparing App Shortcuts and App Intents for localization
- Debugging missing translations or incorrect plural forms
System Requirements
- Xcode 15+ for String Catalogs (
.xcstrings) - Xcode 26+ for automatic symbol generation,
#bundlemacro, and AI-powered comment generation - iOS 15+ for
LocalizedStringResource - iOS 16+ for App Shortcuts localization
- Earlier iOS versions use legacy
.stringsfiles
Part 1: String Catalogs (WWDC 2023/10155)
Creating a String Catalog
Method 1: Xcode Navigator
- File → New → File
- Choose "String Catalog"
- Name it (e.g.,
Localizable.xcstrings) - Add to target
Method 2: Automatic Extraction
Xcode 15 can automatically extract strings from:
- SwiftUI views (string literals in
Text,Label,Button) - Swift code (
String(localized:)) - Objective-C (
NSLocalizedString) - C (
CFCopyLocalizedString) - Interface Builder files (
.storyboard,.xib) - Info.plist values
- App Shortcuts phrases
Build Settings Required:
- "Use Compiler to Extract Swift Strings" → Yes
- "Localization Prefers String Catalogs" → Yes
String Catalog Structure
Each entry has:
- Key: Unique identifier (default: the English string)
- Default Value: Fallback if translation missing
- Comment: Context for translators
- String Table: Organization container (default: "Localizable")
Example .xcstrings JSON:
{
"sourceLanguage" : "en",
"strings" : {
"Thanks for shopping with us!" : {
"comment" : "Label above checkout button",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Thanks for shopping with us!"
}
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "¡Gracias por comprar con nosotros!"
}
}
}
}
},
"version" : "1.0"
}
Translation States
Xcode tracks state for each translation:
- New (⚪) - String hasn't been translated yet
- Needs Review (🟡) - Source changed, translation may be outdated
- Reviewed (✅) - Translation approved and current
- Stale (🔴) - String no longer found in source code
Workflow:
- Developer adds string → New
- Translator adds translation → Reviewed
- Developer changes source → Needs Review
- Translator updates → Reviewed
- Developer removes code → Stale
Part 2: SwiftUI Localization
LocalizedStringKey (Automatic)
SwiftUI views with String parameters automatically support localization:
// ✅ Automatically localizable
Text("Welcome to WWDC!")
Label("Thanks for shopping with us!", systemImage: "bag")
Button("Checkout") { }
// Xcode extracts these strings to String Catalog
How it works: SwiftUI uses LocalizedStringKey internally, which looks up strings in String Catalogs.
String(localized:) with Comments
For explicit localization in Swift code:
// Basic
let title = String(localized: "Welcome to WWDC!")
// With comment for translators
let title = String(localized: "Welcome to WWDC!",
comment: "Notification banner title")
// With custom table
let title = String(localized: "Welcome to WWDC!",
table: "WWDCNotifications",
comment: "Notification banner title")
// With default value (key ≠ English text)
let title = String(localized: "WWDC_NOTIFICATION_TITLE",
defaultValue: "Welcome to WWDC!",
comment: "Notification banner title")
Best practice: Always include comment to give translators context.
LocalizedStringResource (Deferred Localization)
For passing localizable strings to other functions:
import Foundation
struct CardView: View {
let title: LocalizedStringResource
let subtitle: LocalizedStringResource
var body: some View {
ZStack {
RoundedRectangle(cornerRadius: 10.0)
VStack {
Text(title) // Resolved at render time
Text(subtitle)
}
.padding()
}
}
}
// Usage
CardView(
title: "Recent Purchases",
subtitle: "Items you've ordered in the past week."
)
Key difference: LocalizedStringResource defers lookup until used, allowing custom views to be fully localizable.
AttributedString with Markdown
// Markdown formatting is preserved across localizations
let subtitle = AttributedString(localized: "**Bold** and _italic_ text")
Part 3: UIKit & Foundation
NSLocalizedString Macro
// Basic
let title = NSLocalizedString("Recent Purchases", comment: "Button Title")
// With table
let title = NSLocalizedString("Recent Purchases",
tableName: "Shopping",
comment: "Button Title")
// With bundle
let title = NSLocalizedString("Recent Purchases",
tableName: nil,
bundle: .main,
value: "",
comment: "Button Title")
Bundle.localizedString
let customBundle = Bundle(for: MyFramework.self)
let text = customBundle.localizedString(forKey: "Welcome",
value: nil,
table: "MyFramework")
Custom Macros
// Objective-C
#define MyLocalizedString(key, comment) \
[myBundle localizedStringForKey:key value:nil table:nil]
Info.plist Localization
Localize app name, permissions, etc.:
- Select
Info.plist - Editor → Add Localization
- Create
InfoPlist.stringsfor each language:
// InfoPlist.strings (Spanish)
"CFBundleName" = "Mi Aplicación";
"NSCameraUsageDescription" = "La app necesita acceso a la cámara para tomar fotos.";
Part 4: Pluralization
Different languages have different plural rules:
- English: 2 forms (one, other)
- Russian: 3 forms (one, few, many)
- Polish: 3 forms (one, few, other)
- Arabic: 6 forms (zero, one, two, few, many, other)
SwiftUI Plural Handling
// Xcode automatically creates plural variations
Text("\(count) items")
// With custom formatting
Text("\(visitorCount) Recent Visitors")
In String Catalog:
{
"strings" : {
"%lld Recent Visitors" : {
"localizations" : {
"en" : {
"variations" : {
"plural" : {
"one" : {
"stringUnit" : {
"state" : "translated",
"value" : "%lld Recent Visitor"
}
},
"other" : {
"stringUnit" : {
"state" : "translated",
"value" : "%lld Recent Visitors"
}
}
}
}
}
}
}
}
}
XLIFF Export Format
When exporting for translation (File → Export Localizations):
Legacy (stringsdict):
<trans-unit id="/%lld Recent Visitors:dict/NSStringLocalizedFormatKey:dict/:string">
<source>%#@recentVisitors@</source>
</trans-unit>
<trans-unit id="/%lld Recent Visitors:dict/recentVisitors:dict/one:dict/:string">
<source>%lld Recent Visitor</source>
<target>%lld Visitante Recente</target>
</trans-unit>
String Catalog (cleaner):
<trans-unit id="%lld Recent Visitors|==|plural.one">
<source>%lld Recent Visitor</source>
<target>%lld Visitante Recente</target>
</trans-unit>
<trans-unit id="%lld Recent Visitors|==|plural.other">
<source>%lld Recent Visitors</source>
<target>%lld Visitantes Recentes</target>
</trans-unit>
Substitutions with Plural Variables
// Multiple variables with different plural forms
let message = String(localized: "\(songCount) songs on \(albumCount) albums")
Xcode creates variations for each variable's plural form:
songCount: one, otheralbumCount: one, other- Total combinations: 2 × 2 = 4 translation entries
Part 5: Device & Width Variations
Device-Specific Strings
Different text for different platforms:
// Same code, different strings per device
Text("Bird Food Shop")
String Catalog variations:
{
"Bird Food Shop" : {
"localizations" : {
"en" : {
"variations" : {
"device" : {
"applewatch" : {
"stringUnit" : {
"value" : "Bird Food"
}
},
"other" : {
"stringUnit" : {
"value" : "Bird Food Shop"
}
}
}
}
}
}
}
}
Result:
- iPhone/iPad: "Bird Food Shop"
- Apple Watch: "Bird Food" (shorter for small screen)
Width Variations
For dynamic type and size classes:
Text("Application Settings")
String Catalog can provide shorter text for narr
Content truncated.
More by CharlesWiltgen
View all skills by CharlesWiltgen →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversBrowser Use lets LLMs and agents access and scrape any website in real time, making web scraping and web page scraping e
Mobile Next offers fast, seamless mobile automation for iOS and Android. Automate apps, extract data, and simplify mobil
Explore official Google BigQuery MCP servers. Find resources and examples to build context-aware apps in Google's ecosys
Find official MCP servers for Google Maps. Explore resources to build, integrate, and extend apps with Google directions
Automate macOS tasks with AppleScript and JavaScript. Control apps, files, and system efficiently using macOS Automator'
Quickly rp prototype web apps with Scaffold Generator: create consistent scaffolding using templates, variable substitut
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.