{"id":28437081,"url":"https://github.com/flinedev/translatekit","last_synced_at":"2025-06-27T20:31:55.529Z","repository":{"id":276213907,"uuid":"895065654","full_name":"FlineDev/TranslateKit","owner":"FlineDev","description":"SF Symbols for Texts: 2000+ built-in translations in 40 languages + semantic localization key macro for Swift devs","archived":false,"fork":false,"pushed_at":"2025-05-07T04:57:30.000Z","size":6133,"stargazers_count":142,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-05T23:08:38.503Z","etag":null,"topics":["ai","apple","i18n","internationalization","ios","l10n","localization","macos","mobile-development","sdk","sfsymbols","swift","swift-package","translation","tvos","visionos","watchos","xcode"],"latest_commit_sha":null,"homepage":"https://translatekit.app","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FlineDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-27T13:53:44.000Z","updated_at":"2025-05-18T08:25:33.000Z","dependencies_parsed_at":"2025-05-07T05:34:05.129Z","dependency_job_id":null,"html_url":"https://github.com/FlineDev/TranslateKit","commit_stats":null,"previous_names":["flinedev/translatekit"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/FlineDev/TranslateKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlineDev%2FTranslateKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlineDev%2FTranslateKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlineDev%2FTranslateKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlineDev%2FTranslateKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FlineDev","download_url":"https://codeload.github.com/FlineDev/TranslateKit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlineDev%2FTranslateKit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262327252,"owners_count":23294235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","apple","i18n","internationalization","ios","l10n","localization","macos","mobile-development","sdk","sfsymbols","swift","swift-package","translation","tvos","visionos","watchos","xcode"],"created_at":"2025-06-05T23:08:37.919Z","updated_at":"2025-06-27T20:31:55.432Z","avatar_url":"https://github.com/FlineDev.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![TranslateKit SDK Logo](https://github.com/FlineDev/TranslateKit/blob/main/Logo.png?raw=true)\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FFlineDev%2FTranslateKit%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/FlineDev/TranslateKit)\n\n# TranslateKit SDK\n\nWhat SF Symbols is for Icons, TranslateKit is for Text!\n\nEliminate localization overhead in your Swift apps with 2000+ pre-localized strings and semantic key generation. Make app localization simple, accurate, and delightful.\n\n## Key Features\n\n### 1. Pre-localized Common Strings\nAccess 2,000+ ready-to-use strings in ~40 Apple platform languages across four categories. These match the [officially supported iOS system languages](https://www.apple.com/ios/feature-availability/#system-language-system-language) and utilize Apple's own translations where available, ensuring consistency with the system UI. \n\nSince they are pre-localized, they won't add entries to your String Catalog – just use them directly:\n\n```swift\n// Actions: Interactive UI elements\nButton(TK.Action.save) { saveData() }  // \"Save\" → \"Sichern\" (German)\n\n// Labels: Non-interactive text\nLabel(TK.Label.notifications, systemImage: \"bell\")  // \"Notifications\" → \"Benachrichtigungen\"\n\n// Placeholders: Temporary text\nTextField(TK.Label.firstName, text: $firstName,  // \"First Name\" → \"Vorname\"\n         prompt: TK.Placeholder.firstNameExample)  // \"e.g. Jane\" → \"z.B. Erika\"\n\n// Messages: Full sentences\nText(TK.Message.anErrorOccurred)  // \"An Error Occurred\" → \"Ein Fehler ist aufgetreten\"\n```\n\nDiscovering the right translations is effortless with autocompletion – type `TK.` to explore categories and fuzzy-match strings, with English previews and usage hints in the documentation popover:\n\n![Showcasing Autocompletion in Xcode](https://github.com/FlineDev/TranslateKit/blob/main/Images/Autocomplete.jpeg?raw=true)\n\n### 2. Smart Key Generation\nThe `#tk` macro eliminates the tedious work of manual key management by automatically generating semantic keys based on code context:\n\n```swift\nstruct SettingsView: View {\n  let documentName: String\n    \n  var body: some View {\n    // Generates key: SettingsView.Body.saveChanges\n    Button(#tk(\"Save Changes\")) { handleSave() }\n        \n    // Add context with 'c' parameter to help translators\n    Text(#tk(\"Save changes to \\(documentName)?\", \n             c: \"e.g. 'Save changes to MyNumbers.csv'\"))\n  }\n}\n```\n\nString Catalogs made it challenging to maintain best practices from the Strings-file era, where using semantic keys helped group related translations. The macro brings back this advantage while keeping String Catalogs' benefits - you get semantic keys without writing verbose `String(localized:defaultValue:comment:)` calls:\n\n![Macro Expansion in Xcode](https://github.com/FlineDev/TranslateKit/blob/main/Images/MacroExpansion.jpeg?raw=true)\n\nYou can see in the image what the simple `#tk` macro call expands to, adding an auto-derived key. These semantic keys help group related translations and provide crucial context to translators and translation tools (like the [TranslateKit Mac app](https://translatekit.app)), leading to more accurate translations while making your localization files easier to maintain.\n\n### Core Strings \u0026 Category-Specific Extensions\n\nTo keep TranslateKit lightweight while providing comprehensive coverage, the 2,000+ pre-localized strings are organized into two tiers:\n\n1. **Core Strings (250+):**  \n   Included in the base `TranslateKit` package, these strings are commonly used across all kinds of apps, making them universally applicable.\n\n2. **Category-Specific Extensions (~100 per category):**  \n   Each of the **26 App Store categories** has an additional module with strings tailored to that category. For example:\n   - **Finance apps:** `import TranslateKitFinance`\n   - **Productivity apps:** `import TranslateKitProductivity`\n   - **Health \u0026 Fitness apps:** `import TranslateKitHealthAndFitness`\n   \n   These modules also include the core strings, so you only need to import the one matching your app category.\n\nWith this modular approach, TranslateKit remains lightweight, adding only ~1MB to your app, making it suitable for any project – big or small.\n\n## Swift Package Usage\n\nFor Swift packages, use `#tkm` instead of `#tk` to reference the correct String Catalog file:\n\n1. Add `defaultLocalization` to your manifest:\n```swift\nlet package = Package(\n   name: \"FormKit\",\n   defaultLocalization: \"en\",\n   // ...\n)\n```\n\n2. Add `Localizable.xcstrings` to your module (right-click folder \u003e \"New File from Template…\" \u003e String Catalog)\n\n3. Use the `#tkm` macro with optional comment:\n```swift\nstruct FormValidator {\n   static func validatePassword(_ password: String) -\u003e String? {\n       guard password.count \u003e= 8 else {\n           return #tkm(\"Password must be at least 8 characters\")\n       }\n       return nil\n   }\n}\n```\n\nCommon reasons to localize Swift packages are that they may contain UI elements (e.g. modularized apps) or that they might provide error descriptions, which should be localized in most cases.\n\n## Solving Macro Trust Issues in Xcode Cloud\n\nIf you're using Xcode Cloud or experiencing issues with macro trust, check out our guide [Solving Swift Macro Trust Issues in Xcode Cloud Builds](https://www.fline.dev/solving-swift-macro-trust-issues-in-xcode-cloud-builds/). This article explains how to properly configure your build settings when CI systems don't automatically trust macro packages.\n\n## Using TranslateKit without Macros\n\nIf you don't want to use the `tk` macro but still profit from the community-driven common strings in your app, you can also opt for one of the `Lite` targets instead of the regular ones. For example, instead of adding and importing the `TranslateKit` target to your app, you can instead add \u0026 import `TranslateKitLite`. For category-specific variants, instead of something like `TranslateKitGames`, use `TranslateKitGamesLite`.\n\nThe `Lite` variants of the targets ensure that Xcode (and CI workflows) won't ask you to \"Trust \u0026 Enable\" macros in TranslateKit. But they also lack the added context you get when using `#tk` macro. We include these macros by default because we recommend everyone using them, but the `Lite` targets give you a way to opt-out when needed.\n\n## Contributing\n\nContributions – especially additions and corrections – are welcome!\n\nPlease feel free to submit a Pull Request. You don't need to localize added entries to all languages yourself, just provide the one(s) you speak, we'll take care of the other languages using [TranslateKit](https://translatekit.app). But please keep the entries sorted alphabetically when adding new ones!\n\nFor bigger changes, please open an issue first to discuss what you would like to change.\n\n## Showcase\n\nI created this library for my own Indie apps (download \u0026 rate them to show your appreciation):\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eApp Icon\u003c/th\u003e\n    \u003cth\u003eApp Name \u0026 Description\u003c/th\u003e\n    \u003cth\u003eSupported Platforms\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6476773066?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/FlineDev/HandySwiftUI/main/Images/Apps/TranslateKit.webp\" width=\"64\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6476773066?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cstrong\u003eTranslateKit: App Localization\u003c/strong\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      AI-powered app localization with unmatched accuracy. Fast \u0026 easy: AI \u0026 proofreading, 125+ languages, market insights. Budget-friendly, free to try.\n    \u003c/td\u003e\n    \u003ctd\u003eMac\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6502914189?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/FlineDev/HandySwiftUI/main/Images/Apps/FreemiumKit.webp\" width=\"64\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6502914189?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cstrong\u003eFreemiumKit: In-App Purchases for Indies\u003c/strong\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      Simple In-App Purchases and Subscriptions: Automation, Paywalls, A/B Testing, Live Notifications, PPP, and more.\n    \u003c/td\u003e\n    \u003ctd\u003eiPhone, iPad, Mac, Vision\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6587583340?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/FlineDev/HandySwiftUI/main/Images/Apps/PleydiaOrganizer.webp\" width=\"64\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6587583340?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cstrong\u003ePleydia Organizer: Movie \u0026 Series Renamer\u003c/strong\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      Simple, fast, and smart media management for your Movie, TV Show and Anime collection.\n    \u003c/td\u003e\n    \u003ctd\u003eMac\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6480134993?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/FlineDev/HandySwiftUI/main/Images/Apps/FreelanceKit.webp\" width=\"64\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6480134993?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cstrong\u003eFreelanceKit: Project Time Tracking\u003c/strong\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      Simple \u0026 affordable time tracking with a native experience for all devices. iCloud sync \u0026 CSV export included.\n    \u003c/td\u003e\n    \u003ctd\u003eiPhone, iPad, Mac, Vision\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6472669260?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/FlineDev/HandySwiftUI/main/Images/Apps/CrossCraft.webp\" width=\"64\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6472669260?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cstrong\u003eCrossCraft: Custom Crosswords\u003c/strong\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      Create themed \u0026 personalized crosswords. Solve them yourself or share them to challenge others.\n    \u003c/td\u003e\n    \u003ctd\u003eiPhone, iPad, Mac, Vision\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6477829138?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/FlineDev/HandySwiftUI/main/Images/Apps/FocusBeats.webp\" width=\"64\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6477829138?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cstrong\u003eFocusBeats: Pomodoro + Music\u003c/strong\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      Deep Focus with proven Pomodoro method \u0026 select Apple Music playlists \u0026 themes. Automatically pauses music during breaks.\n    \u003c/td\u003e\n    \u003ctd\u003eiPhone, iPad, Mac, Vision\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6478062053?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/FlineDev/HandySwiftUI/main/Images/Apps/Posters.webp\" width=\"64\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6478062053?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cstrong\u003ePosters: Discover Movies at Home\u003c/strong\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      Auto-updating \u0026 interactive posters for your home with trailers, showtimes, and links to streaming services.\n    \u003c/td\u003e\n    \u003ctd\u003eVision\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflinedev%2Ftranslatekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflinedev%2Ftranslatekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflinedev%2Ftranslatekit/lists"}