Minifies iOS localization .strings files by eliminating key duplication and compressing with LZFSE, reducing size by up to 80%.
SmallStrings is an iOS library that minifies and compresses localized .strings files to reduce app bundle size by up to 80%. It works by eliminating key duplication across language files and applying LZFSE compression while maintaining compatibility with iOS's native localization system. The project solves the problem of localization bloat in iOS apps, which can impact download sizes and performance.
iOS developers working on apps with extensive localization who need to optimize bundle size and reduce download times for international users.
Developers choose SmallStrings because it offers a straightforward, drop-in solution that significantly reduces localization file sizes without requiring major architectural changes. Its unique approach of key deduplication combined with efficient compression provides substantial size savings while preserving iOS's language selection behavior.
Minification of localized strings
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
By eliminating key duplication and using LZFSE compression, SmallStrings reduces .strings file sizes by up to 80%, as stated in the README.
Maintains placeholder files to ensure iOS correctly identifies supported languages, keeping native language selection intact without disruption.
Replaces NSLocalizedString with SSTStringForKey, allowing for minimal code changes while leveraging the optimized format.
Uses Apple's LZFSE, which is optimized for iOS devices, providing good compression ratios with low performance overhead.
The README notes it's meant as a proof-of-concept, indicating potential instability or lack of production-ready testing and support.
Requires adding a custom run script build phase and replacing all NSLocalizedString calls, which can be tedious and error-prone for large codebases.
The README is brief and lacks detailed guidance on edge cases, debugging, or integration with modern tools like Swift Package Manager.