Hey Swift community!
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?
Pre-localized UI strings – fewer entries in your String Catalog, less overhead
Auto-generated semantic keys –
#tk
macro ensures clarity & reusability
Optimized for modern SwiftUI workflows – works with String Catalogs
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"
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.
I'd love to hear your thoughts—let’s make localization effortless!