7. App Localizations

preview_player
Показать описание
Localizing your app for different languages became so much easier in Xcode 15 with the introduction of String Catalogs. Even though this is the 7th video in my SwiftDta Series, I won't be covering any SwiftData functions here so if you are here just for Localizations, fear not. You can stay with me as I localize my app to German.

If you want to support my work, you can buy me a coffee :)

Table of Contents:
0:00 Introduction
1:04 LocalizableStrings
1:45 Handling Plurals
4:03 Creating a Second Language Catalog
5:06 Using ChatGPT to translate
8:44 A Preview for every Language
9:30 Dealing with Enum Strings
11:47 Exporting and Importing Translations
15:13 Changing the App Icon

Starter Project Files:

Completed Project:

JSON Playground Gist

Image Assets (Zip file so use Safari to download or fix your Chrome permissions)

Bakery App by Jordi Bruin

Recommended Resources:
BigMountain Studio Books
SwiftUI Views Mastery
SwiftUI 5 Book Bundle
Combine Mastery in SwiftUI
Core Data Mastery in SwiftUI
SwiftUI Animations Mastery

AppCoda Books
Beginning iOS 16 Programming with Swift (SwiftUI + UIKit)
Beginning iOS 16 Programming with Swift (SwiftUI + UIKit) - Starter
Mastering SwiftUI 4 + Swift Programming for iOS 16 - Professional
Mastering SwiftUI 4 - Starter

Other References:
Stewart Lynch's YouTube Channel:
Stewart Lynch on Mastodon:
Stewart Lynch On Threads:
@StewartLynch
Stewart Lynch on X:
Stewart Lynch on LinkedIn
Рекомендации по теме
Комментарии
Автор

Hi Stewart, I thought I didn't need to learn anything more about localization but I learned a lot of new things today. Thank you and best regards from Germany.

berkantdursun
Автор

Stewart, I've found the localization approach so helpful, Thank you, thus far I have yet to fail finding ways to improve my creative problem solving skills viewing your Swift tutorials..

BenHall-kuov
Автор

a great primer on making international language apps

DavidKoontz
Автор

Super helpful course... It also provides me some useful tricks on exporting directly from Xcode. Please do another video for the new accessibility features to complete the series with the Haptic engine. Thanks for sharing this course

Decatilinae
Автор

Very helpful video. Thanks for making this and showing your workflow.

tobiomotayo
Автор

I love the playground hack! Thanks for sharing.

DaveJacobseniOS
Автор

Thanks Stewart. Really good series. Looking forward to the iCloud implementation. I would also like to know how I can share the data between family members.

jorgenandreason
Автор

Very helpful video, Thanks!
Just a quick note for the chatgpt part, you can provide any structure of data to gpt and ask him to fill it with the translations in the right places. I don't think it's necessary to convert the data back and to json again.

david_lev
Автор

Superb explanation - many thanks! Is there a way to create the InfoPlist.xcstrings file without first having to export the Localizable file and import? I have Privacy strings that need to be translated and this seems a roundabout kind of way to create the file. Thanks again for your hard work!

magnas
Автор

Thanks this is very helpful. I did see that the date was not localized, maybe something for a new video, how to localize dates.

marijkehagemans
Автор

Do we can also change the App Icon based on system settings of locale like the App name without selection inside app through code?

HanishGuptaHoney
Автор

Stewart, tried to use the playground and it never worked for me. It returned the exact string I put in words with quotes {} etc …. Not sure why. You kinda moved fast over what you were selecting to paste in the words var. So I might have not pasted exactly what you pasted. Just food for thought. I ended up doing it the long way.

tazman
Автор

Hello
I love you videos, you explain very well. Can you re-do another one about source control (stages and these new things) cause I didn’t code for a lot and when I committed my project when I opened it, the project crashed and couldn’t be opened.
Thanks 😊

KnowFactum
Автор

If you go to (in Xcode) to Product menu then hold the option key and click “Run” (option+cmd+R) you can change the App Language without going to Settings on simulator. PS this will also show that language in preview until “Run” again.

nigelgee
Автор

How does this work for words based on gender? Spanish for example has masculine and feminine versions of some of its words.

rickywitherspoon
Автор

The German word for quote is Zitat, not Zinat.

markaurelius
Автор

how we can add one setting option inside application to change the language ?

bjp_for_