---
title: "How do I localize plurals in an iOS app?"
description: "Interpolate the count into one string such as `\\(count) items`, then select the key in the String Catalog and choose Vary by Plural; Xcode adds the plural categories each language needs. Before Xcode 15, the same forms go into a `.stringsdict` file."
category: ios
date: 2026-10-09
canonical: https://localizely.com/i18n-questions/ios/how-do-i-localize-plurals-in-an-ios-app/
---

# How do I localize plurals in an iOS app?

Write the string once with the count interpolated, and let the localization file hold one form per plural category. Do not assemble the sentence from separate "item" and "items" strings in code; languages have different numbers of forms and different rules for which numbers use them.

In code, the call looks the same for both file formats:

```swift
let label = String(localized: "\(count) items")   // iOS 15 and later
Text("\(count) items")                             // SwiftUI
```

With a String Catalog (Xcode 15 and later), build once so the key `%lld items` appears in `Localizable.xcstrings`, then Control-click it and choose Vary by Plural. Xcode adds the categories of the source language (One and Other for English) and, for every language you add later, that language's categories: One, Few, Many and Other for Russian; Zero, One, Two, Few, Many and Other for Arabic. Each form is a complete sentence with the `%lld` placeholder, and the translator fills in every form their language has.

Before String Catalogs, the same data lives in a `.stringsdict` property list next to `Localizable.strings`. The top-level key is the format string used in code, and the `other` category is required:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>%d items</key>
    <dict>
        <key>NSStringLocalizedFormatKey</key>
        <string>%#@items@</string>
        <key>items</key>
        <dict>
            <key>NSStringFormatSpecTypeKey</key>
            <string>NSStringPluralRuleType</string>
            <key>NSStringFormatValueTypeKey</key>
            <string>d</string>
            <key>one</key>
            <string>%d item</string>
            <key>other</key>
            <string>%d items</string>
        </dict>
    </dict>
</dict>
</plist>
```

```swift
let format = NSLocalizedString("%d items", comment: "Number of items in the cart")
let label = String.localizedStringWithFormat(format, count)
```

If you call `String(localized:)` or `Text` with an interpolated `Int` instead, the key is `%lld items`, so use that as the `.stringsdict` key and `lld` as the value type.

Both formats rely on the CLDR plural rules, which decide that 21 is "one" in Russian but "other" in English, or that 0 has its own form in Arabic. A category that a language does not use is ignored and `other` is used instead, so translators must fill exactly the categories of their language; they are listed per language at [Language plural rules](/language-plural-rules/). The file formats are described at [Apple .xcstrings](/apple-xcstrings-file/) and [Apple .stringsdict](/apple-stringsdict-file/), and a TMS such as Localizely supports the plural forms of both natively.

Source: https://localizely.com/i18n-questions/ios/how-do-i-localize-plurals-in-an-ios-app/
