Localisation in Xcode 15. Utilise new String Catalogs to… | by Jacob Bartlett | Nov, 2023







Utilise new String Catalogs to internationalize your Swift apps

Photograph by Kyle Glenn on Unsplash

String Catalogs are a neat new function launched in WWDC 2023.

.strings information (and, to a good better extent, .stringsdict information) had been one of many last bastions of Goal-C-era cruft within the Apple improvement atmosphere.

However no extra.

I’ve been upgrading Bev, my trusty, boozy aspect mission, to iOS 17. Alongside the way in which, I’ve been implementing the teachings from WWDC23’s Uncover String Catalogs.

Be part of me on the journey!

Previous to Xcode 15, most of your strings can be outlined in a .strings file:

// House display screen
"home_screen_button_add_friend"="Add buddy";
"home_screen_friends_list"="Your folks listing";

You missed one semicolon?

Too dangerous, each string in your module is now damaged, displaying home_screen_title or home_screen_button_add_friend rather than your precise copy.

.stringsdict information are even harder to understand. As a result of totally different languages have totally different grammatical guidelines for dealing with pluralisation, we want a much more advanced beast to outline a single string, even to say one thing so simple as “3 pals”:

<string>No pals</string>
<string>1 buddy</string>
<string>%d pals</string>

Once I first wrote Bev, I did not hassle internationalising the strings.



Supply hyperlink

Share this


Google Presents 3 Suggestions For Checking Technical web optimization Points

Google printed a video providing three ideas for utilizing search console to establish technical points that may be inflicting indexing or rating issues. Three...

A easy snapshot reveals how computational pictures can shock and alarm us

Whereas Tessa Coates was making an attempt on wedding ceremony clothes final month, she posted a seemingly easy snapshot of herself on Instagram...

Recent articles

More like this


Please enter your comment!
Please enter your name here