Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

axiom-localization

БесплатноБез исполняемых скриптовНе проверен

Use when localizing apps, using String Catalogs, generating type-safe symbols (Xcode 26+), handling plurals, RTL layouts, locale-aware formatting, or…

ComeOnOliverот 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/.stringsdict files
  • 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, #bundle macro, and AI-powered comment generation
  • iOS 15+ for LocalizedStringResource
  • iOS 16+ for App Shortcuts localization
  • Earlier iOS versions use legacy .strings files

Part 1: String Catalogs (WWDC 2023/10155)

Creating a String Catalog

Method 1: Xcode Navigator

  1. File → New → File
  2. Choose "String Catalog"
  3. Name it (e.g., Localizable.xcstrings)
  4. 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:

  1. Developer adds string → New
  2. Translator adds translation → Reviewed
  3. Developer changes source → Needs Review
  4. Translator updates → Reviewed
  5. 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
Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить axiom-localization с