Produce Swift code for your Strings Catalogs
@Metadata { @DisplayName("XCStrings Tool") }
The XCStrings Tool Plugin is designed to support your projects in using Xcode 15's new Strings Catalog format as the ultimate source of truth for your localized strings.
Using the XCStrings Tool Plugin for this approach helps you to:
- Keep your views concise and easy to read without localized string definitions
- Avoid having to maintain your own boilerplate constants
- Reuse translator comments for inline code documentation
With a few simple steps, you can turn your strings from this:
Text(
"You've seen \(dogs.count) dogs with a combined rating of \(totalRating)/\(dogs.count * 10)",
bundle: .module,
comment: "Summary of sightings shown at the bottom of the list"
)
To this:
Text(.localizable.contentSummary(dogs.count, totalRating, dogs.count * 10))
- doc:Integrating-XCStrings-Tool-into-an-Xcode-Project-Target
- doc:Integrating-XCStrings-Tool-into-a-Swift-Package-Target
- doc:Changing-the-Access-Level
- doc:Moving-Away-from-XCStrings-Tool