Highlight
Xcode 27 introduces coding agents that use the context accumulated by String Catalogs, including code locations, usage descriptions, and reference translations in other languages, to localize apps directly inside the IDE. The workflow also supports translation review, UI truncation detection, and iterative refinement.
Core Content
What machine translation has lacked is not models, but context
Software localization has always been painful. Traditional machine learning models struggled with ambiguity in software strings. Modern large language models are much stronger general-purpose translators, but without context they still fail in obvious ways.
In English, does “book” mean the noun, or the verb “reserve”? The same word can map to entirely different translations in different languages. Without context, the model can only guess, and when it guesses wrong, the UI shown to users becomes confusing.
Apple began addressing this three years ago with String Catalogs. Two years ago, String Catalogs started recording where strings appear in code. Last year, they began recording string usage and automatically generating descriptive comments. This year, Xcode 27 feeds all of that context to coding agents so translation can happen directly in the IDE.
One-click translation: the full flow from request to completion
(02:19) Developers only need to click New Conversation in the Xcode toolbar and tell the agent, for example, “Translate the app into Canadian French.” Everything after that runs automatically.
The agent first asks Xcode to prepare the project: it adds the target language to the project settings, builds all targets to discover every localizable string, and then writes newly discovered strings into a String Catalog. If the project does not already have a String Catalog, Xcode creates one automatically with the default filename Localizable.
(03:11) Developers can also organize strings with custom table names. For example, adding tableName: "Greetings" to Text sends that string into a String Catalog named Greetings.
Next, the agent batches the strings and assigns them to multiple subagents for concurrent translation. Xcode gives each subagent rich context: where the string appears in code, other strings that use similar terms, and even existing translations of that string in other languages.
(04:14) For a string like %lld items, Xcode tells the subagent that this is a pluralized string with English variants such as “one item” and “two items.” The subagent can then generate the corresponding plural variants in Canadian French as well. Plural rules vary widely by language, and Xcode makes sure the subagent always knows which variants the target language needs.
New feature development can keep translations consistent automatically
(07:17) Translation is not a one-time task. When developers add new features to an already localized app, the agent can handle that work too.
In the demo, the developer added a new feature to an app that already had Canadian French localization, then asked the agent to implement and localize it. When translating the new strings, the agent reused the developer’s earlier choice of “attraits” for “landmarks” instead of using the default translation. That means the agent can maintain terminology consistency through project context provided by Xcode, without reading past conversations.
Translation review: finding issues before release
(08:46) After translation completes, developers can ask the agent to render UI previews and check how different languages display.
Canadian French sentences are often longer than English, so text truncation is easy to introduce. The agent marks the problem areas directly in the preview, and the developer can decide whether to adjust layout, shorten the translation, or fix an implementation bug.
The same review approach applies to other language characteristics. Thai characters are tall and can be clipped vertically. Arabic is written right-to-left, so view alignment needs checking. Finding these problems during development prevents users from seeing broken interfaces after release.
(10:20) Beyond agent review, Apple also recommends collecting feedback from native speakers through TestFlight. Translation quality is not as easy to judge at a glance as code quality, so screenshots and suggestions from native testers are the final line of defense.
Details
SwiftUI string localization
SwiftUI APIs such as Text and Button are localizable by default, and their strings are automatically exposed to the localization system.
Text("Hello, world!", comment: "A standard greeting")
Key points:
- The
commentparameter gives translators context and avoids ambiguity - SwiftUI components automatically register strings with the String Catalog
If you need a custom String Catalog filename, use tableName:
Text("Hello, world!", tableName: "Greetings", comment: "A standard greeting")
Key points:
tableName: "Greetings"writes the string into Greetings.xcstrings instead of the default Localizable.xcstrings- This is useful for splitting strings by module or feature in larger projects
Localization outside SwiftUI code
In ViewModels, data layers, or other non-UI code, you need to use localization APIs explicitly:
String(localized: "Hello, world!", comment: "A standard greeting")
LocalizedStringResource("Hello World!", bundle: #bundle, comment: "A standard greeting")
Key points:
String(localized:)is the most common way to retrieve a localized stringLocalizedStringResourceis useful when a localized resource needs to be passed to another module- Hard-coded strings will not be discovered by Xcode’s build system and must be wrapped in these APIs
Machine-translation markers in XLIFF
When exporting XLIFF files for review by professional translators, machine-translated content carries a specific marker:
<trans-unit id="Grand Canyon" xml:space="preserve">
<source>Grand Canyon</source>
<target state="translated" state-qualifier="leveraged-mt">Grand Canyon</target>
<note>Name of the 'Grand Canyon' landmark.</note>
</trans-unit>
Key points:
state-qualifier="leveraged-mt"clearly indicates that the translation came from an agent- Professional translators can use this marker to quickly filter content that needs human review
- The comments inside
<note>come from context automatically collected by String Catalogs
Writing translation guidance for agents
(12:06) Developers can create a TRANSLATION.md file in the project to give agents translation guidance. It can include:
- Required translations for specific terms, such as a glossary
- Lists of terms that should not be translated, such as product names and trademarks
- A description of the desired tone and style
Agents use Xcode’s built-in language-specific style guides by default, and also read additional guidance supplied by the developer. Keeping translation guidance in a dedicated TRANSLATION.md file avoids loading unrelated context during non-translation tasks.
Model selection advice
(13:02) Translation is a complex, long-running task, and terminology needs to stay consistent across the entire project. Apple recommends choosing a large model with a broad context window and strong support for long-running requests. Translation quality can vary by language because some languages appear less often in training data, so check the model provider’s documentation to understand language coverage.
Key Takeaways
Build a multilingual travel guide app
- What to build: An app that introduces attractions around the world and supports more than 10 languages
- Why it is worth building: With Xcode agent translation, one developer can complete multilingual localization work that used to require an outsourced team. String Catalogs automatically collect context for attraction names, descriptions, and other strings, making the translations far more accurate than generic machine translation
- How to start: Build the UI with SwiftUI and make sure every string is declared through
TextorString(localized:). Invoke the agent in Xcode, choose the target languages, and after translation finishes, use the agent to check UI truncation in each language
Build a terminology consistency checker
- What to build: In a large project, different developers may translate the same English term into different Chinese terms. Build a script that scans XLIFF files and finds cases where one
sourcemaps to multipletargetvalues - Why it is worth building: Agents can use context to maintain consistency, but strings developed across modules or over time can still drift. This tool can run as part of CI and flag inconsistencies before merge
- How to start: Parse exported XLIFF, group entries by
source, count the number of distincttargetvalues for eachsource, and report any source with more than one target
Build a translation quality scoring shortcut
- What to build: After collecting screenshot feedback from native users through TestFlight, have an agent compare the actual UI shown in the screenshot with the translation in the String Catalog and flag likely problems such as truncation, overflow, or alignment errors
- Why it is worth building: It automates the human translation review workflow, especially for products that update content frequently
- How to start: Use Xcode’s agent-powered UI preview rendering as the starting point, then feed both the preview image and translation text into a vision model for comparison
Build a localized vocabulary learning app for children
- What to build: Children’s apps need a tone and vocabulary very different from adult apps. Build an educational app with substantial localization needs and high sensitivity to tone
- Why it is worth building: In
TRANSLATION.md, you can describe requirements such as “use simple words, keep the tone friendly, and avoid abstract concepts,” and the agent will adjust translations accordingly. Traditional machine translation cannot do this reliably - How to start: Write a detailed translation style guide first, then test the output in different languages in Xcode and iterate on the guide
Related Sessions
- 101 Keynote — The WWDC26 opening keynote, likely covering the broader AI and agent strategy
- 259 Xcode agents — A general introduction to Xcode agents, the platform foundation for the translation workflow in this session
- 262 Swift — New Swift language features, potentially including localization-related API updates
- 344 Code-along: Explore localization with Xcode — A hands-on localization code-along that complements the concepts in this session
- 227 UI Prototypes with agents — Using agents for UI prototyping, closely related to this session’s use of agents to render previews and check translations
Comments
GitHub Issues · utterances