Stringsdict File Format

A .stringsdict file is a property list used to define language plural rules.

Avoid using a .stringsdict file with a string that does not include a number, because a language might define generic singular and plural forms in ways that don’t work well with the one and other categories.

Localized String Properties

Each key-value pair in the .stringsdict file defines a plural rule for a specific string, as in:

<plist version="1.0">
        <key>%d file(s) remaining</key>
        <key>%d service hour(s)</key>
        <key>%d award(s)</key>

You pass the same strings—for example, @”%d file(s) remaining”, @”%d service hour(s)” and @”%d award(s)”—to a NSLocalizedString macro in your code.

Localized Format String Properties

The plural rule determines the format string returned by the NSLocalizedString macro. You supply a format string for each category of numbers the language defines. The value of this dictionary has the following keys:


A format string that contains variables. A variable is preceded by the %#@ characters and followed by the @ character, as in:


where the variable name is files. The format string can contain multiple variables, as in %#@files@ (%#@bytes@, %#@minutes@).


A dictionary of key-value pairs specifying the rule to use for [variable], as in:

                <string>%d file remaining</string>
                <string>%d files remaining</string>

For example, if the number is 2, the @”%d files remaining” format string is returned and the localized string becomes @”2 files remaining”.

Add plural rules for each variable that appears in the NSStringLocalizedFormatKey format string.

Plural Rule Properties

The [variable] dictionary contains the following keys:


Specifies the type of language rule. The only possible value is NSStringPluralRuleType, which indicates a language plural rule.


A string format specifier for a number, as in %d for an integer. For a list of format specifiers, see String Format Specifiers in String Programming Guide.


The format string to use for the number 0.


The format string to use for additional language-dependent categories.


The format string to use for additional language-dependent categories.

few, many

Format strings to use for additional language-dependent categories.


The format string to use for all numbers not covered by the other categories. This key is required.

For the plural categories and rules for each language, see CLDR Language Plural Rules.