{"id":19250881,"url":"https://github.com/willpowell8/localizationkit_ios","last_synced_at":"2025-05-16T16:04:09.485Z","repository":{"id":56919931,"uuid":"73236351","full_name":"willpowell8/LocalizationKit_iOS","owner":"willpowell8","description":"Realtime Dynamic localization translation delivery system for iOS and Mac OSX in Swift. Create and update texts from localization.com without needing to recompile or redeploy. Cocapod for iOS devices (iPad, iPhone, iPod Touch and Mac)","archived":false,"fork":false,"pushed_at":"2019-10-31T13:27:54.000Z","size":1066,"stargazers_count":1228,"open_issues_count":12,"forks_count":79,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-05-16T16:03:32.606Z","etag":null,"topics":["cocoapods","language","localization","localization-kit","realtime","translation"],"latest_commit_sha":null,"homepage":"https://www.localizationkit.com/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/willpowell8.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-08T23:31:39.000Z","updated_at":"2025-05-12T06:11:13.000Z","dependencies_parsed_at":"2022-08-20T21:50:18.526Z","dependency_job_id":null,"html_url":"https://github.com/willpowell8/LocalizationKit_iOS","commit_stats":null,"previous_names":[],"tags_count":68,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willpowell8%2FLocalizationKit_iOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willpowell8%2FLocalizationKit_iOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willpowell8%2FLocalizationKit_iOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willpowell8%2FLocalizationKit_iOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willpowell8","download_url":"https://codeload.github.com/willpowell8/LocalizationKit_iOS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254564121,"owners_count":22092121,"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":["cocoapods","language","localization","localization-kit","realtime","translation"],"created_at":"2024-11-09T18:19:13.022Z","updated_at":"2025-05-16T16:04:09.456Z","avatar_url":"https://github.com/willpowell8.png","language":"Swift","readme":"![alt text](https://raw.githubusercontent.com/willpowell8/LocalizationKit_iOS/master/page/LocalizationLogo.png \"iOS Localization Logo\")\n# LocalizationKit\n[![Version](https://img.shields.io/cocoapods/v/LocalizationKit.svg?style=flat)](http://cocoapods.org/pods/LocalizationKit)\n[![License](https://img.shields.io/cocoapods/l/LocalizationKit.svg?style=flat)](http://cocoapods.org/pods/LocalizationKit)\n[![Platform](https://img.shields.io/cocoapods/p/LocalizationKit.svg?style=flat)](http://cocoapods.org/pods/LocalizationKit)\n\nLocalization kit is a powerful to localize texts and translation management tool. I am a developer and invariably I get the questions 'Can you just change this text?' or 'Can you add another language?' I have designed this framework so you can manage these translations and texts without having to recompile, resubmit and without the need to use developers. Essentially take out all of the pain.\n\n![alt text](https://raw.githubusercontent.com/willpowell8/LocalizationKit_iOS/master/page/LocalizationKit.gif \"Realtime iOS Localize your app\")\n\n## How does it work\nLocalization Kit quickly and easily integrates into your app using Cocoapods. Then it connects to services from [LocalizationKit.com](http://www.localizationkit.com/app/) which are free to use and manage. Then as you create items in your iOS app the text keys become available instantly in the online web UI. From there you can change the text and it is reflected within app in realtime (as you type any key).\n\n## Installation\n\n### Using Cocoapods\n\nLocalizationKit is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n```ruby\npod \"LocalizationKit\" \"~\u003e4.0.3\" # Swift 4\npod \"LocalizationKit\" \"~\u003e3.0.12\" # Swift 3.2\n```\n\n### Using Carthage\n\n```ruby\ngithub \"willpowell8/LocalizationKit_iOS\" ~\u003e 4.0.3 // Swift 4\ngithub \"willpowell8/LocalizationKit_iOS\" ~\u003e 3.0.13 // Swift 3.2\n```\n\n## Setup\n\nThen go to https://www.localizationkit.com/app/ and create a new app on the left handside using your name. Then take the code generated currently in the url after #/app/...KEY HERE...\n\nThen put the following into your app delegate:\n\nAt the top:\n```swift\nimport LocalizationKit\n```\nand in the didFinishLaunchingWithOptions the following with your key:\n```swift\nLocalization.start(appKey: \"[[KEY]]\")\n```\n\n### Enabling Live Update\nOne of the most powerful features of LocalizationKit is the capability to edit the text in realtime on the device. You can start the live service in the following ways:\n#### At Initialization\n```swift\nLocalization.start(appKey: \"bed920eb-9802-4a2c-a8c0-69194729d69d\", live: true)\n```\n\n#### From within Settings Bundle\nMake sure you create a settings bundle with boolean object named live_localization\n```swift\nLocalization.start(appKey: \"bed920eb-9802-4a2c-a8c0-69194729d69d\", useSettings: true)\n```\n#### Toggle it within app\n```swift\nLocalization.liveEnabled = true\n```\n\n### Enabling Inline Edits\nAs part of the application you can enable the inline editing of the localizations using long press on fields.\n![alt text](https://raw.githubusercontent.com/willpowell8/LocalizationKit_iOS/master/page/LocalizationKit-Inline.png \"Inline Localization Editor\")\nElements supporting Inline Edit: UILabel, UIButton\n#### Toggle it within app\n```swift\nLocalization.allowInlineEdit = true\n```\n\n## Using Interface Builder\nLocalization kit has support for Xcode UI development. The process is as simple as:\n- install the cocoapod\n- open storyboard or xib file\n- select component eg UILabel or drag on standard component UILabel\n- open attribute selector\n- set a Localize Key\n- run app and the key will be available online\n\n![alt text](https://raw.githubusercontent.com/willpowell8/LocalizationKit_iOS/master/page/iOS_Localization_IBInspector_Xcode_1_1.png \"Quick and Easy localization using interface builder\")\n\n### Supported Components\n- UILabel\n- UINavigatioNitem\n- String\n- UIBarItem\n- UIBarButtonItem\n- UITextField\n- UIButton\n- DateFormatter\n\n## Using from Code\nThere are several ways of using the localization system from code without using storyboard or interface builder. The first is from any string you can call the .localize to call the localized string for it. This does not give you the live updates of the text but provides you with the text at the moment you call it.\n```swift\nlet localizedGreeting = \"Hello\".localize\n```\nThis will create a localization key of String.*Your String* (which has dots replacing the spaces). For example 'Select Languages' would become String.Select.Languages. These texts will similarly be made available for you to localize within the web UI.\n```swift\nlet resultText = Localization.get(\"Localization.Key\", alternate: \"default label text\")\n```\n## Localization Keys\nLocalization Keys are the unique identifiers that allow you to assign localization to the correct part within your app. You can use any string as a device identifier, however the application has some features to make live easier if you use dot separation methodology: ie. Product.Details.Label\n\n## Caching\nLocalizationKit internalizes the caching of the localizations and translations that you have translated. Currently once a languages is loaded from the server it is stored locally for offline and subsequent use. It is updated everytime the app is reopened where by the local version is first loaded and then replaced by the server version.\n\nTO DO - add a build phase script that can pull first version of the \n\n## Other Functions\n\n#### Set language\n```swift\nLocalization.setLanguage(\"de\")\n```\n\n#### Get Available Languages\n```swift\nLocalization.availableLanguages { (languages) in\n// Languages is an array of [Language] which has properties localizedName and key\n}\n```\n\n#### Reset to device language\n```swift\nLocalization.resetToDeviceLanguage()\n```\n\n#### Show debug Strings\n```swift\nLocalization.ifEmptyShowKey = true\n```\n\n#### Set Default Language\nThe default language is the language that you have built the application in and will be used for passing to the backend for showing strings and data.\n```swift\nLocalization.defaultLanguageCode = \"en\"\n```\n\n\n## Events\nIf you enable the live update process then you will be able to listen to localization events. These events are:\n\n- **LocalizationEvent**  - this is when a text is updated. \n```swift\nLocalization.localizationEvent(localizationKey: String)\n```\n- **Highlight Event** - this is when a user has clicked the highlight button in the web UI.\n```swift\nLocalization.highlightEvent(localizationKey: String)\n```\n\n#### Example Listening To An Event\n\n```swift\nNotificationCenter.default.addObserver(self, selector: #selector(localizationHighlight), name: Localization.highlightEvent(localizationKey: LocalizeKey!), object: nil)\n```\n\n#### Example Date Formatter\nDate format as it is a single call it does adhere to the live updates. Note the dateFormat String must be set before the Localization Key\n```swift\nlet d = DateFormatter()\nd.dateFormat = \"dd MMM yyyy\"\nd.LocalizeKey = \"General.DateFormatter\"\nlet dStr = d.string(from: Date())\nprint(dStr)\n```\n\n\n## Example\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Author\n\nWill Powell - [LinkedIn](https://www.linkedin.com/in/willpowelluk) | [Blog](http://www.willpowell.co.uk)\n\n## License\n\nLocalizationKit is available under the MIT license. See the LICENSE file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillpowell8%2Flocalizationkit_ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillpowell8%2Flocalizationkit_ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillpowell8%2Flocalizationkit_ios/lists"}