Logo for tanaschita.com

How to migrate from Localizable.strings to String Catalogs

Learn how to migrate your iOS project to .xcstrings for localization.

06 Nov 2023 · 1 min read

At WWDC23, Apple introduced String Catalogs which is a new way to add localization to iOS projects. In this article on how to use String Catalogs for localization, we already learned the basics of String Catalogs.

In this article, we are going to look at how to migrate to String Catalogs in projects which already use Localizable.strings files.

Let's get started.

Sponsorship logo
Preparing for a technical iOS job interview - updated for iOS 17
Check out my book on preparing for a technical iOS job interview with over 200 questions & answers. Test your knowledge on iOS topics such as Swift, SwiftUI, Combine, HTTP Networking, Authentication, SwiftData & Core Data, Concurrency with async/await, Security, Automated Testing, Machine Learning and more.
LEARN MORE

The first thing to mention when thinking about migrating to String Catalogs is backward compatibility. The good news is that String Catalogs are fully backward compatible. Xcode converts the String Catalog back to plain old .strings and .stringsdict files during the build process.

The other good news is that Xcode can do the whole migration process for us. All we need to do is to right-click on the Localizable.strings file and select Migrate to String Catalog.

Xcode offers automatic migration to String Catalogs
Xcode offers automatic migration to String Catalogs.

Note that if you are working with third-party services or libraries for localization, you should check whether they support String Catalogs before the migration.

Sponsorship logo
Preparing for a technical iOS job interview - updated for iOS 17
Check out my book on preparing for a technical iOS job interview with over 200 questions & answers. Test your knowledge on iOS topics such as Swift, SwiftUI, Combine, HTTP Networking, Authentication, SwiftData & Core Data, Concurrency with async/await, Security, Automated Testing, Machine Learning and more.
LEARN MORE

Newsletter

Image of a reading marmot
Subscribe

Like to support my work?

Say hi

Related tags

Articles with related topics

swiftdata

swift

ios

How to define one-to-many relationships in SwiftData

Learn to use SwiftData's @Relationship macro.

19 Feb 2024 · 4 min read

Latest articles and tips

© 2024 tanaschita.com

Privacy policy

Impressum