Localization — Foundations Skill
Purpose
Route Apple-platform localization implementation tasks to the minimum
required Knowledge Contracts. v1 covers how an app's user-facing strings
and resources are extracted, stored, varied, and resolved across languages
and regions -- not Xcode project configuration, translator XLIFF workflow,
runtime content translation, source-copy style rules, value formatting, or
RTL visual design. Baseline is Xcode 16+ with an iOS 17+ API surface;
String Catalogs impose no deployment-target cost, since .xcstrings
compiles to .strings/.stringsdict at build time.
Routing
Load only the contracts relevant to the task. All paths relative to
knowledge/localization/.
- Creating or populating a
.xcstrings String Catalog; extraction and
the literal requirement; translator comment:; New/Needs
Review/Translated/Stale states; explicit keys vs. value-as-key;
manually-managed entries; "Don't Translate"; migrating a
.strings/.stringsdict table -> string-catalogs-and-extraction.md
- Calling
String(localized:), LocalizedStringResource,
LocalizedStringKey, Text/Text(verbatim:),
AttributedString(localized:), or NSLocalizedString; format
specifiers; the locale: parameter -> localized-string-apis.md
- Varying a string by count or device; CLDR plural categories;
substitutions;
.stringsdict; ^[...](inflect: true)
-> plural-and-device-variations.md
Locale.current/autoupdatingCurrent;
preferredLanguages/preferredLocalizations;
Locale.Language/Locale.Region; CFBundleDevelopmentRegion; the
.lproj fallback chain -> locale-and-language-resolution.md
- RTL layout;
\.layoutDirection;
flipsForRightToLeftLayoutDirection; semanticContentAttribute;
effectiveUserInterfaceLayoutDirection; SF Symbols mirroring;
characterDirection; RTL pseudolanguages
-> layout-direction-and-rtl-apis.md
InfoPlist.xcstrings/InfoPlist.strings;
CFBundleDisplayName/CFBundleName; .lproj structure; localizing
assets; Bundle.module/defaultLocalization;
Bundle.localizedString(forKey:value:table:)
-> localized-resources-and-infoplist.md
Never load more than the contracts relevant to the specific question.
Stop Conditions
Stop and report if the requested topic has no matching Knowledge Contract
in knowledge/localization/ -- do not guess or fall back to general
knowledge.
- Adding a language to an Xcode project and the
.xcloc/XLIFF
export-and-import round trip — owned by xcode
- The iOS 18 Translation framework (
TranslationSession, .translationTask,
.translationPresentation) — Excluded; real and documented, so neither
fabricate guidance for it nor claim it does not exist
- Source-copy wording, capitalization, punctuation, and international
representation/formatting — owned by
style-guide
- Date, time, number, and measurement formatting — owned by
foundation
- RTL visual-design decisions — owned by
human-interface-guidelines
- App Shortcuts phrase and
AppEnum localization — owned by app-intents
- App Store Connect localized metadata, APNs
loc-key/loc-args payloads,
macOS/watchOS/tvOS-specific behavior — Excluded
- Apple publishes no
.xcstrings schema -- never assert its JSON field names
1---2name: localization3description: Route Apple-platform localization tasks to the correct Knowledge Contracts -- String Catalog (.xcstrings) mechanics, compiler-driven extraction and the string-literal requirement it depends on, translator comments, the New/Needs Review/Translated/Stale states, explicit keys vs. value-as-key, and manually-managed entries; the localized-string API surface (String(localized:), LocalizedStringResource for deferred cross-process resolution, LocalizedStringKey and SwiftUI's implicit Text literal localization, Text(verbatim:), AttributedString(localized:), format specifiers, NSLocalizedString); plural and device variation, the CLDR categories with other required, substitutions, and legacy .stringsdict; Locale and language resolution (current vs. autoupdatingCurrent, preferredLanguages vs. preferredLocalizations, Locale.Language/Locale.Region, CFBundleDevelopmentRegion, the .lproj fallback chain); layout-direction and RTL APIs including SF Symbols' name-driven mirroring; and localized resources (InfoPlist.xcstrings, 4---56# Localization — Foundations Skill78## Purpose910Route Apple-platform localization implementation tasks to the minimum11required Knowledge Contracts. v1 covers how an app's user-facing strings12and resources are extracted, stored, varied, and resolved across languages13and regions -- not Xcode project configuration, translator XLIFF workflow,14runtime content translation, source-copy style rules, value formatting, or15RTL visual design. Baseline is Xcode 16+ with an iOS 17+ API surface;16String Catalogs impose no deployment-target cost, since `.xcstrings`17compiles to `.strings`/`.stringsdict` at build time.1819## Routing2021Load only the contracts relevant to the task. All paths relative to22knowledge/localization/.2324- Creating or populating a `.xcstrings` String Catalog; extraction and25 the literal requirement; translator `comment:`; New/Needs26 Review/Translated/Stale states; explicit keys vs. value-as-key;27 manually-managed entries; "Don't Translate"; migrating a28 `.strings`/`.stringsdict` table -> string-catalogs-and-extraction.md29- Calling `String(localized:)`, `LocalizedStringResource`,30 `LocalizedStringKey`, `Text`/`Text(verbatim:)`,31 `AttributedString(localized:)`, or `NSLocalizedString`; format32 specifiers; the `locale:` parameter -> localized-string-apis.md33- Varying a string by count or device; CLDR plural categories;34 substitutions; `.stringsdict`; `^[...](inflect: true)`35 -> plural-and-device-variations.md36- `Locale.current`/`autoupdatingCurrent`;37 `preferredLanguages`/`preferredLocalizations`;38 `Locale.Language`/`Locale.Region`; `CFBundleDevelopmentRegion`; the39 `.lproj` fallback chain -> locale-and-language-resolution.md40- RTL layout; `\.layoutDirection`;41 `flipsForRightToLeftLayoutDirection`; `semanticContentAttribute`;42 `effectiveUserInterfaceLayoutDirection`; SF Symbols mirroring;43 `characterDirection`; RTL pseudolanguages44 -> layout-direction-and-rtl-apis.md45- `InfoPlist.xcstrings`/`InfoPlist.strings`;46 `CFBundleDisplayName`/`CFBundleName`; `.lproj` structure; localizing47 assets; `Bundle.module`/`defaultLocalization`;48 `Bundle.localizedString(forKey:value:table:)`49 -> localized-resources-and-infoplist.md5051Never load more than the contracts relevant to the specific question.5253## Stop Conditions5455Stop and report if the requested topic has no matching Knowledge Contract56in knowledge/localization/ -- do not guess or fall back to general57knowledge.5859- Adding a language to an Xcode project and the `.xcloc`/XLIFF60 export-and-import round trip — owned by `xcode`61- The iOS 18 Translation framework (`TranslationSession`, `.translationTask`,62 `.translationPresentation`) — Excluded; real and documented, so neither63 fabricate guidance for it nor claim it does not exist64- Source-copy wording, capitalization, punctuation, and international65 representation/formatting — owned by `style-guide`66- Date, time, number, and measurement formatting — owned by `foundation`67- RTL visual-design decisions — owned by `human-interface-guidelines`68- App Shortcuts phrase and `AppEnum` localization — owned by `app-intents`69- App Store Connect localized metadata, APNs `loc-key`/`loc-args` payloads,70 macOS/watchOS/tvOS-specific behavior — Excluded71- Apple publishes no `.xcstrings` schema -- never assert its JSON field names