A plugin to generate Swift constants for your Strings Catalogs.

What's New



What's Changed

  • Fix generation for strings with repeating or reordered arguments by @liamnichols in #19
  • Generate UInt arguments for %u, %x, %X and %o placeholders by @paulgessinger in #23

New Contributors

Full Changelog: 0.1.0...0.1.1

SHA for xcstrings-tool.artifactbundle.zip: a4198c6f0bd206286d43e083cd5341f46e221bc92a1a6dc527fd1bcb91c57b09

XCStrings Tool


A plugin to generate Swift constants for your String Catalogs.


Hardcoding localized strings in your code and then having the compiler automatically extract them into the Strings Catalog (or legacy .strings files) works great on smaller projects, but over time you will often find that this approach doesn't scale well.

You usually find yourself compromising on either code quality, translator comments or boilerplate code from having to define your own constants, but it doesn't have to be this way!

struct ContentView: View {
    @Query var items: [Item]

    var body: some View {
        List {
            Section {
                ForEach(items) { item in
            } footer: {

XCStrings Tool aims to extend your localization experience so that you don't have to compromise anything. It does this by using your Strings Catalog as a source for generating elegant Swift code that you can reference directly within the rest of your project.

Getting Started

XCStrings Tool is a Swift Package Plugin that can integrate directly into Xcode and Swift Package targets that contain Strings Catalog (.xcstrings) files.

For more information about the Strings Catalog format, check out the Discover Strings Catalogs video from WWDC 2023.


To see XCStrings Tool in action, check out the Dog Tracker demo project for yourself.


View the documentation on the Swift Package Index

If you have an improvement for the documentation, you can modify it here.


Contributions to XCStrings Tool are welcome!


  • Swift Tools 5.9.0
View More Packages from this Author


Last updated: Fri Mar 01 2024 10:07:58 GMT-1000 (Hawaii-Aleutian Standard Time)