axiom-localization
БесплатноБез исполняемых скриптовНе проверенUse when localizing apps, using String Catalogs, generating type-safe symbols (Xcode 26+), handling plurals, RTL layouts, locale-aware formatting, or…
от ComeOnOliver★ 67 звёзд на GitHubОб этом скилле
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: 1
Установить axiom-localization в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл 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
Как установить скилл axiom-localization?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл axiom-localization запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic