{"id":19856977,"url":"https://github.com/johnvuko/jt-translator-ios","last_synced_at":"2025-06-12T16:09:33.291Z","repository":{"id":56916575,"uuid":"64208844","full_name":"johnvuko/jt-translator-ios","owner":"johnvuko","description":"Remotely manage your translations on iOS","archived":false,"fork":false,"pushed_at":"2016-09-23T09:37:11.000Z","size":6,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-12T16:09:31.852Z","etag":null,"topics":["i18n","ios","swift","translate","translation","translations"],"latest_commit_sha":null,"homepage":null,"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/johnvuko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-26T09:32:08.000Z","updated_at":"2022-04-03T17:32:27.000Z","dependencies_parsed_at":"2022-08-21T03:50:34.539Z","dependency_job_id":null,"html_url":"https://github.com/johnvuko/jt-translator-ios","commit_stats":null,"previous_names":["johnvuko/jt-translator-ios"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/johnvuko/jt-translator-ios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2Fjt-translator-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2Fjt-translator-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2Fjt-translator-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2Fjt-translator-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnvuko","download_url":"https://codeload.github.com/johnvuko/jt-translator-ios/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2Fjt-translator-ios/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259500231,"owners_count":22867338,"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":["i18n","ios","swift","translate","translation","translations"],"created_at":"2024-11-12T14:17:06.822Z","updated_at":"2025-06-12T16:09:33.268Z","avatar_url":"https://github.com/johnvuko.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JTTranslator\n\n![Version](https://img.shields.io/cocoapods/v/JTTranslator.svg)\n![License](https://img.shields.io/cocoapods/l/JTTranslator.svg)\n![Platform](https://img.shields.io/cocoapods/p/JTTranslator.svg)\n\nJTTranslator is an easy to way to manage your translations on iOS without building a new version of your app, which allow you to update your translations after having released on the AppStore.\n\nIt's work with [Translator](https://translator.eivo.fr), a platform for manage your translations on iOS and Android.\n\n## Installation\n\nWith [CocoaPods](http://cocoapods.org), add this line to your Podfile.\n\n    pod 'JTTranslator', '~\u003e 1.0'\n\n\n## Usage\n\nYou have to initialize `JTTranslator` with your API KEY to download your translations.\nThe `start` method will automatically load the last downloaded versions of your translations and try to update them.\n\nIn your AppDelegate, just add:\n\n```swift\nimport JTTranslator\n\n@UIApplicationMain\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n\tfunc application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -\u003e Bool {\n\t    JTTranslator.start(apiKey: \"YOUR_API_KEY\")\n\t}\n\t\n}\n```\n\n\nThe easiest way is to replace every call to `NSLocalizedString` by a global method which I call `tr`. This method try to get the translations from `JTTranslator` and the translation if is not found, it will fallback on `NSLocalizedString`.\n\nIf you want to do like me, you have to create this global method:\n\n```swift\nfunc tr (_ key: String) -\u003e String {\n    return JTTranslator.tr(key: key) ?? NSLocalizedString(key, comment: \"\")\n}\n```\n\nFor example, in this case if you want to manage the translations for a `UILabel`, you will have to do something like:\n\n```swift\nlet label = UILabel()\nlabel.text = tr(\"the_translation_key_you_choose\")\n```\n\nYou can also force to update the translations by calling `JTTranslator.update()`.\n\n## Author\n\n- [Jonathan Tribouharet](https://github.com/jonathantribouharet) ([@johntribouharet](https://twitter.com/johntribouharet))\n\n## License\n\nJTTranslator is released under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnvuko%2Fjt-translator-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnvuko%2Fjt-translator-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnvuko%2Fjt-translator-ios/lists"}