{"id":1702,"url":"https://github.com/EmergeTools/SmallStrings","last_synced_at":"2025-08-02T04:32:23.306Z","repository":{"id":62455646,"uuid":"419851126","full_name":"EmergeTools/SmallStrings","owner":"EmergeTools","description":"Minification of localized strings","archived":false,"fork":false,"pushed_at":"2023-11-13T16:03:38.000Z","size":20,"stargazers_count":127,"open_issues_count":2,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-04T17:54:31.988Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.emergetools.com","language":"Objective-C","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/EmergeTools.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}},"created_at":"2021-10-21T19:24:30.000Z","updated_at":"2024-11-20T16:17:22.000Z","dependencies_parsed_at":"2024-01-07T22:23:27.365Z","dependency_job_id":"0bf66fa0-2744-4f59-add5-cfbf78e2ed99","html_url":"https://github.com/EmergeTools/SmallStrings","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmergeTools%2FSmallStrings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmergeTools%2FSmallStrings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmergeTools%2FSmallStrings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmergeTools%2FSmallStrings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmergeTools","download_url":"https://codeload.github.com/EmergeTools/SmallStrings/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228439108,"owners_count":17920018,"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":[],"created_at":"2024-01-05T20:15:53.751Z","updated_at":"2025-08-02T04:32:23.294Z","avatar_url":"https://github.com/EmergeTools.png","language":"Objective-C","readme":"![Emerge Tools rounded](https://user-images.githubusercontent.com/6634452/205205728-19b3376a-e99a-4a74-916b-0519deeff08b.png)\n\n# SmallStrings | Reduce localized .strings file sizes by 80%\n#### Maintained by [Emerge Tools](https://emergetools.com?utm_source=smallstrings) \n\n\u003e 🧪 **Note**: This repo is meant as a proof-of-concept on how to reduce localization size. Adjustments may be needed for your specific project.\n\n### How does it work\n\n- Convert .strings files (of the form App.app/\\*.lproj/Localizable.strings only) into a minified form\n- Eliminate key duplication ([read more about the strategy](https://eisel.me/localization)), this typically reduces the size by about 50%\n- Keep small files in a compressed form on disk, using LZFSE, to reduce the size further\n- Replace the original language.lproj/Localizable.strings with placeholders that have one key-value pair each. This shows Apple that the same languages are still supported, so that it can pick the correct one based on the user's settings.\n- Use the iOS library that replaces `NSLocalizedString` with a new version, `SSTStringForKey` that fetches values for keys from this minified format.\n\n### Usage\n\n#### Cocoapods\n\nAdd this to your Podfile:\n```\npod 'SmallStrings'\n```\n\nThen add a Run Script build phase after the \"Copy bundle resources\" phase:\n```\ncd ${PODS_ROOT}/SmallStrings \u0026\u0026 ./localize.sh ${CODESIGNING_FOLDER_PATH} ${DERIVED_FILES_DIR}/SmallStrings.cache\n```\n\nLastly, replace all usages of `NSLocalizedString(key, comment)` with `SSTStringForKey(key)`.\n\n#### Manual\n\n- Add `Source/SSTSmallStrings.{h,m}` to your project.\n- Create a `compress` binary via `clang -O3 compress.m -framework Foundation -lcompression -o compress` and put the executable in the same directory as `localize.{rb,sh}`.\n- Add a build step with `cd /path/to/SmallStrings \u0026\u0026 ./localize.sh ${CODESIGNING_FOLDER_PATH} ${DERIVED_FILES_DIR}/SmallStrings.cache`.\n- Lastly, replace all usages of `NSLocalizedString(key, comment)` with `SSTStringForKey(key)`.\n","funding_links":[],"categories":["Optimization"],"sub_categories":["Push Notification Providers"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEmergeTools%2FSmallStrings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEmergeTools%2FSmallStrings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEmergeTools%2FSmallStrings/lists"}