Skip to content
SwiftSkills

Localizing an iOS app with AI agents: String Catalogs, Xcode 27 and MCP tools

In Xcode 27, ask the coding assistant "Translate my app into Italian" or click Generate Translations in the String Catalog. For Claude Code, Codex or Cursor in the terminal, use a String Catalog MCP server so the agent edits keys instead of the whole JSON. Put a glossary in TRANSLATION.md, then review and test every language.

Last updated:

This page is about localizing the strings inside your app with a coding agent: getting them into String Catalogs, translating, keeping terminology consistent, reviewing and testing. For setting up the agents inside Xcode, see Agents inside Xcode 27. For the App Store listing, see the section near the end.

Option 1: the agent inside Xcode 27

Apple's article "Localizing your app using agents" describes the built-in workflow. Enable an agent in Intelligence settings first, then:

  1. Ask in the coding assistant, for example "Translate my app into Italian." Xcode adds the language, builds all targets so every localizable string lands in a String Catalog, and also localizes human-readable text in the Info.plist.

  2. Watch the artifacts. Progress shows in the transcript; changed files appear in the artifacts pane, with a summary at the end.

  3. Or use the editor. The new Generate Translations button in the String Catalog toolbar fills missing translations for all languages (select the source language), for one language, or for selected strings. It is also in the context menu.

What Xcode gives the agent while it translates, per Apple: where each string appears in your code, which strings need plural or device variations, similar strings so terminology stays consistent, and any style you ask for (Apple's examples: language for children, formal business tone). The Xcode 27 release notes add that Xcode creates missing String Catalogs (111514130), ships style guides for additional languages (183679292), new MCP tools to read, plan and edit translations in String Catalogs (176376425) and an Apple-built localization specialist (178289150). The notes don't say which of these tools are exposed to agents outside Xcode.

Prepare the code before any agent translates

An agent can only translate what reaches the String Catalog. Apple's checklist:

  • Use localizable APIs. SwiftUI views treat their strings as localizable automatically. Other Swift code needs String(localized: "Hello, world!"); UIKit and AppKit have similar APIs. Rebuild afterwards so the catalog updates.

  • Split big projects into several catalogs by passing a tableName or table to the localizable APIs; otherwise everything goes into Localizable.xcstrings.

  • Give context with comments. Pass comments in code, or let Xcode write them: Generate Comment in the catalog's context menu, or turn on "Automatically generate string catalog comments" in Xcode > Settings > Editing (Localized Strings). Exports mark those comments "auto-generated".

  • Mark what must stay as is. In Xcode 27, a localization comment of "do not translate" sets the string to Don't Translate in the catalog and translate="no" in exported XLIFF (111715368).

  • Plurals and devices. Control-click a key with a number and choose Vary by Plural: English gets One and Other, and Xcode adds the categories each language needs (Apple's example: Russian One, Few, Many, Other). Vary by Device gives different text per device, for example "Tap" on iOS and "Click" on macOS.

Give the agent a translation brief

Apple recommends putting translation guidance in files agents read automatically, such as AGENTS.md or CLAUDE.md, and keeping the details in a separate TRANSLATION.md: a glossary of your app's terms and a list of strings not to translate. To share that setup across all your Xcode projects, Apple points to its article on extending and customizing agents.

Several tools below keep a similar brief in the repo: Localship has a .localship/ folder with glossary and voice notes, xcstrings-mcp has glossary support, and apple-l10n-zh ships an Apple-terminology glossary for Simplified Chinese.

Option 2: terminal agents (Claude Code, Codex, Cursor)

A terminal agent can edit .xcstrings directly, since it is JSON. Two problems: big catalogs eat the context window, and a broken placeholder or plural still compiles. Two ways around it:

  • Work on catalogs through an MCP server (table below), so the agent reads and writes single keys and the tool validates format specifiers and plurals.

  • Use Apple's XLIFF round trip. xcodebuild -exportLocalizations -project <projectname> -localizationPath <dirpath> [[-exportLanguage <targetlanguage>] ...] writes .xcloc bundles (add -includeScreenshots for screenshots from your localization tests); xcodebuild -importLocalizations -project <projectname> -localizationPath <dirpath> brings them back. Apple's note: enable the Use Compiler to Extract Swift Strings build setting so the export includes all Swift strings.

Localization tools for agents compared

Tool / skillWhat it does (from README)AgentsInstall (from README)License★ (25 Oct)Last push
xcstrings-crud (Ryu0118)CLI and MCP server with targeted read, add, update and stats operations, so the agent never loads the whole catalog; keeps Xcode metadata such as shouldTranslateClaude Code, any MCP clientmise use -g github:Ryu0118/xcstrings-crud, then xcstrings-crud mcpMIT2625 Oct 2026
xcstrings-mcp (Murzav)Rust MCP server: 32 tools, 8 prompts, 12 CLI commands; batch translation, plural and device variations, format-argument checks, glossary, .strings migration, XLIFF import and exportClaude Code, Cursor, Codex, VS Code, Windsurf and othersbrew install Murzav/tap/xcstrings-mcp, then claude mcp add xcstrings-mcp -- xcstrings-mcpMIT OR Apache-2.0523 Oct 2026
string-catalog-mcp (onmyway133)MCP server to list languages, show catalog statistics, search keys, read and update translationsClaude Code, any MCP clientclaude mcp add string-catalog-mcp -- npx string-catalog-mcpMIT per README/npm (no LICENSE file in repo)1223 Aug 2026 ⚠
SwiftUI Localize (ihugang)Skill with scan (read-only), apply and lint (CI gate) modes: finds hardcoded strings in Text, Button and Label, checks placeholder consistency and unused keys, works with .strings and String Catalogs; optional glossary and zh-Hant QAClaude Code (README: reusable in Codex, Cursor, Windsurf and others)npx skills add https://github.com/ihugang/swiftui-localization-skill --skill swiftui-localizeMIT026 Jan 2026 ⚠
xclocsmith (asutekku)Linter and editor that catches lost format specifiers, missing plural forms and strings missing from the catalog; MCP server and edit hook for the translate-then-verify loopClaude Code, any MCP clientbrew install asutekku/tap/xclocsmithMIT531 Jul 2026 ⚠
Lingua (povio)Generates iOS and Android strings from one Google Sheet; bundled skills let the agent add keys to the sheet and use them in codeClaude Code, Cursorbrew tap poviolabs/lingua, brew install linguaMIT5822 Oct 2026
Localship (jigarfumakiya)MCP server, skills and Claude Code plugin; translates with your own agent using code context, glossary and voice notes, checks placeholders, plurals and escaping, local review page, CI checkClaude Code, Codex, Gemini CLI, Cursor, VS Codeclaude mcp add localship -- npx -y localship mcpMIT120 Oct 2026
l10n-agent (svcho)Lints Swift for unlocalized UI text and catalogs for missing or stale translations, rewrites code to keys, translates with a local model (Ollama, LM Studio); 11 MCP tools and a Claude Code skillClaude Code, any MCP clientgit clone + scripts/install.sh, then claude mcp add --scope project l10n-agent -- l10n-agent mcpApache-2.0016 Oct 2026
apple-l10n-zh (Fldicoahkiin)Chinese only: skill for Simplified Chinese with Apple's official terminology; works on .xcstrings, .xcloc and XLIFF and checks placeholder parityClaude Codenpx skills add Fldicoahkiin/apple-l10n-zhMIT018 Jun 2026 ⚠

⚠ = no push for more than 4 weeks. SwiftUI Localize was last updated on 26 Jan 2026 (last push), so check its output against current Xcode String Catalog features. Localship and l10n-agent describe themselves as early-stage in their READMEs. Lingua needs a Google Sheet and API key as its source of truth.

Which one to pick:

  • You work inside Xcode 27: start with the built-in agent and Generate Translations; add a TRANSLATION.md.

  • Claude Code, Codex or Cursor on a large catalog: xcstrings-crud for lean key-level edits, or xcstrings-mcp if you also need XLIFF, migration from .strings or merge handling.

  • You want a hard check after every translation run: xclocsmith (or xcstrings-mcp's validation) in CI.

  • A read-only audit of a SwiftUI project first: SwiftUI Localize in scan mode (last updated Jan 2026).

  • You want translations to stay on your machine: l10n-agent with a local model.

  • Several platforms, one review flow: Localship (String Catalogs plus Android and gettext) or Lingua (Google Sheet as the single source).

  • Simplified Chinese with Apple's wording: apple-l10n-zh (Chinese only).

Review what the agent translated

  • Xcode sets agent translations to Machine Translated in the String Catalog editor; exported XLIFF gets state-qualifier="leveraged-mt" (161775544). Reviewers and vendors can filter on that.

  • The catalog sidebar shows a percentage per language, so you see what is still missing.

  • Never let an agent overwrite reviewed strings by accident: l10n-agent states it never overwrites approved translations, and Localship can fail CI on unapproved strings.

Test every language

Apple's checklist after machine translation:

  • Previews: set .environment(\.locale, .init(identifier: "de")) on a SwiftUI preview; for right-to-left languages also set layoutDirection to rightToLeft. Xcode 27 adds previewing UI in a different localization (181040291).

  • Run scheme: Product > Scheme > Edit Scheme > Run > Options, then App Language and App Region. Changing the language on the device changes the whole OS.

  • Layout: use Dynamic Type so taller scripts don't clip, and leave room for right-to-left languages.

  • UI tests: Xcode 27's launch-test template runs across every orientation, localization and appearance your app supports (168770106).

  • People: ask native speakers for feedback, for example through TestFlight.

A prompt that keeps the loop tight:

Translate the new onboarding strings into German and Japanese. Follow TRANSLATION.md, keep every format specifier, add plural variants where a number is shown, and don't touch strings that are already reviewed. Then render the onboarding preview in both languages and list any truncated text.

The App Store listing is a separate job

In-app strings and your App Store product page are localized in different places. For localized metadata, keywords and screenshots with agents, see App Store Connect MCP and App Store screenshots and ASO with AI tools.

FAQ

Can Claude Code translate an .xcstrings String Catalog?
Yes. A String Catalog is JSON, so any agent can edit it, but large catalogs waste context and are easy to break. MCP servers such as xcstrings-crud, xcstrings-mcp or string-catalog-mcp let the agent read and write single keys, and tools like xclocsmith or xcstrings-mcp check placeholders and plural forms afterwards.
How do I translate my app with the agent in Xcode 27?
Enable an agent in Xcode's Intelligence settings, then ask the coding assistant something like "Translate my app into Italian." Apple says Xcode adds the language, builds all targets to fill the String Catalogs and localizes the Info.plist. In the String Catalog editor, the Generate Translations button translates all languages, one language or selected strings.
How do I stop the agent from translating brand names?
Apple suggests keeping translation guidance in a file the agent reads, for example a TRANSLATION.md referenced from AGENTS.md or CLAUDE.md, with a glossary and a list of strings not to translate. In Xcode 27, strings whose localization comment says "do not translate" are marked Don't Translate in the String Catalog and translate="no" in exported XLIFF.
How can I tell which strings an agent translated?
Xcode sets agent translations to the Machine Translated state in the String Catalog editor, and when you export to XLIFF it sets the state-qualifier to leveraged-mt. That lets a reviewer or a translation vendor filter exactly those strings. Several MCP tools add their own review states on top.
How do I test a localized iOS build?
Apple's options: set App Language and App Region in the Run scheme (Product > Scheme > Edit Scheme > Run > Options), preview SwiftUI views with the locale environment value, and check Dynamic Type and right-to-left layouts. Then ask native speakers for feedback through TestFlight.