Skip to content

Commit 4b51363

Browse files
authored
Update readme to add header image
1 parent b4f1f78 commit 4b51363

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
# SmallStrings
2-
## Reducing localized .strings file sizes by 80%
1+
![Emerge Tools rounded](https://user-images.githubusercontent.com/6634452/205205728-19b3376a-e99a-4a74-916b-0519deeff08b.png)
32

4-
### How it works
3+
# SmallStrings | Reduce localized .strings file sizes by 80%
4+
#### Maintained by [Emerge Tools](https://emergetools.com?utm_source=smallstrings)
55

6-
The library consists of a build-time minification step, and an iOS library:
7-
- The minification tool converts the .strings files (of the form App.app/\*.lproj/Localizable.strings only) into a minified form. First, this tool eliminates key duplication by following the strategy from https://eisel.me/localization. This reduces the size by roughly 50%. Then, it keeps all these small files in a compressed form on disk, using LZFSE, reducing the size further. It also replaces 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.
8-
- An iOS library that replaces `NSLocalizedString` with a new version, `SSTStringForKey` that fetches values for keys from this minified format.
6+
### How does it work
7+
8+
- Convert .strings files (of the form App.app/\*.lproj/Localizable.strings only) into a minified form
9+
- Eliminate key duplication ([read more about the strategy](https://eisel.me/localization)), this typically reduces the size by about 50%
10+
- Keep small files in a compressed form on disk, using LZFSE, to reduce the size further
11+
- 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.
12+
- Use the iOS library that replaces `NSLocalizedString` with a new version, `SSTStringForKey` that fetches values for keys from this minified format.
913

1014
### Usage
1115

0 commit comments

Comments
 (0)