Skip to content
DeveloperMemos

String Catalogs vs. Localizable.strings

iOS, Localization, String Catalogs, Localizable.strings2 min read

When it comes to iOS app development and localization, ensuring that your app is accessible to a global audience is paramount. In the past, developers have relied on the familiar "Strings File" format (often named Localizable.strings) to manage app strings for various languages. However, with the introduction of Xcode 15, Apple unveiled a new way to handle localization – "String Catalogs." In this article, we'll delve into the differences between String Catalogs and the traditional Localizable.strings approach.

String Catalogs: A Modern Localization Solution

String Catalogs represent a significant evolution in the localization workflow for iOS apps. Here's a quick look at what the new interface in XCode looks like for a String Catalog:

XCode Interface Screenshot

They offer several advantages over the legacy Localizable.strings approach:

1. Organization and Clarity

String Catalogs are more organized and structured. Instead of having a single monolithic strings file, you create separate catalogs for each language you support. This modularity makes it easier to manage and locate specific translations.

2. Real-time Feedback

One of the standout features of String Catalogs is the ability to receive real-time feedback on the completeness of your localization. As you add translations, Xcode updates the localization coverage percentage, providing developers with a clear indication of their progress.

3. Eliminating Unused Strings

String Catalogs help you identify and eliminate unused strings. Xcode actively scans your project and highlights strings that are no longer used, allowing for efficient maintenance and reducing clutter in your localization files.

4. Pluralization and Variables

Handling pluralization and variables in strings has traditionally been a complex task. String Catalogs simplify this process by allowing you to specify variations for different plural forms and manage variables seamlessly.

5. Variation by Device Type

String Catalogs enable you to vary your app's localization based on the device type. This is particularly useful for tailoring the user experience to iOS and Mac users, ensuring that your app feels native on each platform.

Localizable.strings: The Legacy Approach

While Localizable.strings has been the go-to method for iOS app localization for years, it has some inherent limitations:

1. Lack of Organization

Localizable.strings files can become unwieldy, especially for larger projects with extensive localization. Finding and maintaining translations can be challenging.

2. Manual Error-Prone Process

With the legacy approach, developers manually collect and maintain translations, making it susceptible to errors and inconsistencies. Even a simple syntactic error can break the entire localization implementation.

3. No Real-time Feedback

Unlike String Catalogs, Localizable.strings files do not provide real-time feedback on localization coverage or the identification of unused strings.

4. Limited Pluralization Support

Handling pluralization in Localizable.strings often involves cumbersome workarounds and can result in complex and error-prone code.

5. Device-Specific Localization

Adapting your app's user interface for different device types, such as iOS and Mac, can be challenging and may require conditional logic in your code.

Summary

In summary, String Catalogs represent a modern and efficient approach to iOS app localization. They address the limitations of the legacy Localizable.strings format by providing better organization, real-time feedback, and improved support for pluralization and variable handling. Additionally, String Catalogs offer the flexibility to tailor your app's localization to different device types, enhancing the user experience across platforms. While Localizable.strings served its purpose in the past, String Catalogs usher in a new era of localization simplicity and efficiency!