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
Check out my new book on preparing for a technical iOS job interview with over 200 questions & answers. Test your knowledge on iOS topics such as Swift & Objective-C, SwiftUI & UIKit, Combine, HTTP Networking, Authentication, Core Data, Concurrency with async/await, Security, Automated Testing 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
Check out my new book on preparing for a technical iOS job interview with over 200 questions & answers. Test your knowledge on iOS topics such as Swift & Objective-C, SwiftUI & UIKit, Combine, HTTP Networking, Authentication, Core Data, Concurrency with async/await, Security, Automated Testing 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

swiftui

swift

ios

How to store images in SwiftData

Learn how to efficiently store larger amounts of data in SwiftData.

27 Nov 2023 · 1 min read

Latest articles and tips

© 2023 tanaschita.com

Privacy policy

Impressum