TranslateKit SDK – SF Symbols-like simplicity for app localization!

Hey Swift community! :wave:

I’m excited to introduce TranslateKit SDK, a new open-source package that brings SF Symbols-like simplicity to app localization.

Instead of manually managing localization for common UI strings, the TranslateKit SDK provides 1000+ pre-localized strings in ~40 languages, covering actions, labels, placeholders, and messages.

Why TranslateKit SDK?

:white_check_mark: Pre-localized UI strings – fewer entries in your String Catalog, less overhead
:key: Auto-generated semantic keys – #tk macro ensures clarity & reusability
:zap: Optimized for modern SwiftUI workflows – works with String Catalogs
:package: Swift Package support – easily integrates into existing projects

How it Works

Instead of defining translations manually, just use TK.Action.cancel, TK.Label.notifications, etc.:

// Actions: Interactive UI elements
Button(TK.Action.save) { saveData() }  // "Save" → "Sichern" (German)

// Labels: Non-interactive text
Label(TK.Label.notifications, systemImage: "bell")  // "Notifications" → "Benachrichtigungen"

// Placeholders: Temporary text
TextField(TK.Label.firstName, text: $firstName,
          prompt: TK.Placeholder.firstNameExample)  // "e.g. Jane" → "z.B. Erika"

:bulb: SF Symbols-like experience: Type TK. and autocomplete will show available options with English previews.

Smart Key Generation with #tk Macro

The #tk macro eliminates the need for manual key definitions by automatically generating semantic keys based on code context. This makes it easier to maintain translations while keeping String Catalog compatibility.

struct SettingsView: View {
    let documentName: String

    var body: some View {
        // Generates key: SettingsView.Body.saveChanges
        Button(#tk("Save Changes")) { handleSave() }

        // Add context with 'c' parameter to help translators
        Text(#tk("Save changes to \(documentName)?", 
                 c: "e.g. 'Save changes to MyNumbers.csv'"))
    }
}

Here's a screenshot showing what the macro expands to:

Why does this matter?

  • Brings back semantic key grouping (like in .strings files).
  • No more guessing key names—they're auto-generated.
  • Better translation quality—context is preserved.

Built for Indie Devs & Teams

TranslateKit was designed to simplify localization for Indie developers (like me!) and teams that want to expand globally without the headache of managing translations manually.

Here's the GitHub project:

PRs welcome! Help expand our collection of pre-localized strings & languages. :blue_heart:

I'd love to hear your thoughts—let’s make localization effortless! :rocket:

6 Likes

I wrote an article to explain the motivation behind TranslateKit SDK better: :eyes::point_down:

2 Likes

Does the #tk macro allow you to specify a bundle? Like, if I wanted to use this in an existing Xcode Framework (not a SPM module), I'd need to pass the correct module.

I see that there's a #tkm macro, but that seems to hard-code it to use bundle: .module. That won't work inside a framework; is there some other way to do this?

My goal was to keep things simple, thus I covered the use cases I‘m aware of, which are apps and Swift packages. I didn’t know there are more use cases, but we can certainly extend the package to cover your use case as well.

Feel free to open an issue on GitHub with your use case so we can discuss what the best solution could look like.