What’s going on
I created a new project by Xcode 15.1
recently. It’s an iOS App with UIKit and Storyboard architecture.
Everything was good at the begining, just like the “Old good days”. I build, and shiped it within 2 days.
Time back to now, the app runs good and I tried to add Chinese localization. And here comes the problem: I can’t find any Info.plist in Xcode. So I have no idea how to localize the app name.
Afeter some researching, I found the solution: Discover String Catalogs
How to do it
1. Create a new String Catalog
file
”File” – “New” – “File…” and find String Catalog
category
Here comes the most important thing: Name this file with InfoPlist
2. Localize App name
As all “Old fashined” iOS developer knows, what we need is CFBundleDisplayName
, so just dive in.
Conclusion
String Catalog
was introduced by Apple in WWDC 2023, and it’s really a good way to handle your localization stuff.
In the past we have to maintain several String Files
, carefully keep them synced with the same Key-value, and don’t miss the ;
.
Now with String Catalog
, we can simply build the target, String Catalog
will discover and handle most of the localizable contents in one place.
Give it a shot, you will love it.