Translating

Plural Forms (Strings)

Content is machine translated from English by Phrase Language AI.

Each language has its own grammatical forms for singular and plural phrases.

Example:

  • English has two forms: one and other, as in 1 file and 2 files.

  • Other languages may have one or even several forms: one, few, and other.

This presents a challenge for localization.

The translation of plural-sensitive strings is supported, including both cardinal and ordinal plural forms. These strings must be translated using the plural forms based on the plural rules of the target language. These plural forms must be defined in the source file.

Example:

  • The English string There are %d% items left, where %d% represents any number except 1.

  • In Czech, this needs to to be translated in two ways.

    The first for numbers 2, 3 or 4 (i.e. few) and the second for numbers 0, 5 and more (i.e. other).

PO (gettext) files commonly use plural forms as well as ICU messages.

For more information about plural rules, see CLDR plural rules.

Handling plural forms

Many localization file formats are supported and handle plural values in different ways. The most common ways are presented for each format.

The number of plural forms is automatically handled according to Unicode rules. This means that some languages have up to 6 forms, while others have only a few. When adding a locale to a project and providing the ISO code, the correct plural categories for that language are automatically displayed in the Strings editor for translation. On export, plural keys are converted into the correct syntax for the target platform.

Plural forms are handled in the Plural forms tab of the Project settings window.

plural_forms_tab.gif

Keys can be set as pluralized by enabling plural forms when creating or editing a key. To enable plural forms on a per-key basis in the Keys tab of a project, follow these steps:

  1. In the project page, select More/Keys.

    The Keys tab is displayed.

  2. Click the cog wheel Modify icon of the desired key.

    The Edit key window is displayed.

  3. Click on the Plural forms tab and select Enable plural forms for this key.

    The Plural form type dropdown is displayed.

  4. Choose between Cardinal and Ordinal plural type.

    Important

    Changing the plural type clears existing translations.

  5. Click Save.

Ensure a Plural key name is provided if required by the used format (e.g., when using gettext).

Plural form type is also displayed and editable in the Meta section of the editor sidebar for each key.

Was this article helpful?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.