AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Localization Setup

skill-rshankras-claude-code-apple-skills-localization-setup · by rshankras

Generate internationalization (i18n) infrastructure for multi-language support in iOS/macOS apps. Use when localizing for multiple languages, adopting String Catalogs (xcstrings), or supporting RTL languages.

No reviews yet
0 installs
5 views
0.0% view→install

Install

$ agentstack add skill-rshankras-claude-code-apple-skills-localization-setup

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-rshankras-claude-code-apple-skills-localization-setup)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Localization Setup? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Localization Setup Generator

Generate internationalization (i18n) infrastructure for multi-language support in iOS/macOS apps.

When This Skill Activates

  • User wants to localize their app for multiple languages
  • User mentions i18n, internationalization, or localization
  • User asks about String Catalogs or .strings files
  • User wants to support RTL (right-to-left) languages

Pre-Generation Checks

Before generating, verify:

  1. Existing Localization

``bash # Check for existing localization files find . -name "*.xcstrings" -o -name "Localizable.strings" 2>/dev/null | head -5 find . -name "*.lproj" -type d 2>/dev/null | head -5 ``

  1. Deployment Target

``bash # String Catalogs require iOS 16+ / macOS 13+ grep -r "IPHONEOS_DEPLOYMENT_TARGET\|MACOSX_DEPLOYMENT_TARGET" *.xcodeproj 2>/dev/null ``

  1. Project Structure

``bash # Find project for adding localization find . -name "*.xcodeproj" | head -1 ``

Configuration Questions

1. Localization Approach

  • String Catalogs (Recommended, iOS 16+) - Modern, visual editor in Xcode
  • Legacy .strings - Traditional approach, all iOS versions

2. Initial Languages

  • English (en) - default
  • Which additional languages? (e.g., es, de, fr, ja, zh-Hans)

3. Features

  • Pluralization - Handle "1 item" vs "2 items"
  • Device-specific - Different strings for iPhone/iPad/Mac
  • SwiftUI Preview - Preview in different locales

Generated Files

String Catalogs (Recommended)

Resources/
└── Localizable.xcstrings    # String catalog with all translations

Supporting Code

Sources/Localization/
├── LocalizedStrings.swift   # Type-safe string access
├── LocalizationManager.swift # Runtime language switching
└── LocalizedPreview.swift   # SwiftUI preview helpers

Key Features

Type-Safe String Access

// Generated enum for type-safe access
enum L10n {
    static let appName = String(localized: "app_name")
    static let welcomeMessage = String(localized: "welcome_message")

    enum Settings {
        static let title = String(localized: "settings_title")
        static let language = String(localized: "settings_language")
    }
}

// Usage
Text(L10n.appName)
Text(L10n.Settings.title)

Pluralization

// In String Catalog, define plural rules
// key: "items_count"
// variations:
//   - zero: "No items"
//   - one: "1 item"
//   - other: "%lld items"

Text(String(localized: "items_count \(count)",
            defaultValue: "\(count) items"))

String Interpolation

// In String Catalog:
// key: "greeting"
// value: "Hello, %@!"

let name = "Alice"
Text(String(localized: "greeting \(name)"))

Runtime Language Switching

// Preview in different locale
struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
            .environment(\.locale, Locale(identifier: "es"))
    }
}

Integration Steps

1. Add String Catalog

  1. In Xcode: File > New > File
  2. Choose "String Catalog"
  3. Name it "Localizable.xcstrings"
  4. Add to your app target

2. Add Supported Languages

  1. Select project in navigator
  2. Info tab > Localizations
  3. Click + to add languages

3. Migrate Existing Strings

If migrating from .strings files:

  1. Right-click .strings file
  2. "Migrate to String Catalog..."

4. Use in SwiftUI

// Automatic localization
Text("Hello, World!")  // Uses String Catalog automatically

// Explicit localized string
Text(String(localized: "custom_key"))

// With type-safe enum (generated)
Text(L10n.welcomeMessage)

5. Use in UIKit

label.text = String(localized: "hello_world")
// or
label.text = NSLocalizedString("hello_world", comment: "Greeting")

Best Practices

Key Naming Conventions

// Good: Descriptive, hierarchical
"settings.appearance.theme"
"onboarding.step1.title"
"error.network.connection_failed"

// Avoid: Vague or hardcoded text as key
"button1"
"Hello, World!"

Comments for Translators

String(localized: "delete_confirmation",
       comment: "Alert message asking user to confirm deletion")

Formatting

// Numbers - Use FormatStyle
Text(price, format: .currency(code: "USD"))

// Dates - Use FormatStyle
Text(date, format: .dateTime.month().day())

// Lists - Use ListFormatStyle
Text(items, format: .list(type: .and))

RTL Support

// Automatic with SwiftUI
// For manual layout adjustments:
.environment(\.layoutDirection, .rightToLeft)

Testing Localization

In Xcode

  1. Edit Scheme > Run > Options
  2. Set "App Language" to test language
  3. Set "App Region" for number/date formatting

In SwiftUI Previews

#Preview {
    ContentView()
        .environment(\.locale, Locale(identifier: "ja"))
}

Export for Translation

  1. Product > Export Localizations...
  2. Share .xliff files with translators
  3. Import translated .xliff files

References

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.