How to use String Catalogs for pluralization in Swift
Learn how to handle plural forms correctly with String Catalogs.
19 Jan 2026 · 3 min read
String Catalogs provide a type-safe way to handle plural forms across languages. In this article, we look at how to define pluralized strings in String Catalogs and how to use them from Swift without manual formatting or conditional logic.
Let's jump in.

Defining pluralized strings in a String Catalog
To define a pluralized string, we start by creating a localization key as usual, for example:
applesSelection.title
To enable pluralization, we right-click the key-value pair in the String Catalog and choose “Vary by Plural”.
Xcode then automatically generates the required plural categories for the current language. What remains is adjusting the translations for the different plural cases. For example:
%lld apple // For one%lld apples // For other
The format specifier (%lld) tells the localization system that this string expects a numeric value, which will later drive pluralization.
Which plural forms are shown depends on the language. Some languages only require one and other, while others define additional categories.
Using the pluralized string in Swift and SwiftUI
Once a plural variable is defined, Xcode generates a typed accessor for the localized string. We can use it as follows:
Text(.applesSelectionTitle(1))
Outside SwiftUI, we can use the same accessor:
let text = String(localized: .applesSelectionTitle(5))
In both cases, the value we pass determines which plural form is selected for the current locale. There is no string interpolation and no conditional logic in code, the localization system handles everything.



Newsletter
Like to support my work?
Say hi
Related tags
Articles with related topics
Latest articles and tips



