Localizely logo
  • Home
  • Getting started
  • How it works
  • Pricing
  • FAQ
Sign up

I18n questions · ICU message format

What is the difference between plural and select in ICU message format? 

plural chooses a branch from a number: the value is matched against exact cases such as =0 and then against the CLDR plural categories of the locale. select chooses a branch from an arbitrary string, typically a gender or a status, by exact keyword match. selectordinal is plural for ordinal numbers (1st, 2nd, 3rd). All three must contain an other branch, otherwise the message does not parse.

A plural message:

{count, plural, =0 {No new messages} one {# new message} other {# new messages}}

For 0, 1 and 5 in English this prints No new messages, 1 new message and 5 new messages. The branch names are categories, not numbers: one covers 1 in English, 0 and 1 in French, and 1, 21, 31 and so on in Russian. The categories each language uses are listed on the language plural rules page, and # prints the number formatted for the locale.

A select message:

{gender, select, female {She replied} male {He replied} other {They replied}}

The argument is a string and the match is exact: female selects the first branch, while Female or any unknown value falls to other. select has no #, no =value cases and no locale rules. It is a plain keyword lookup, which makes it right for closed sets such as gender, pronoun, account type or platform, and wrong for quantities, where it would ignore the plural rules of the language.

A selectordinal message:

You finished {place, selectordinal, one {#st} two {#nd} few {#rd} other {#th}}!

English ordinal rules put 1, 21 and 101 in one, 2 and 22 in two, 3 and 23 in few, and 11, 12 and 13 in other, so 3 prints You finished 3rd! and 13 prints You finished 13th!. Ordinal categories are a separate rule set from the cardinal ones of the same language; English cardinals use only one and other.

In short: use plural when the wording depends on a quantity, select when it depends on a non-numeric value, selectordinal for ranks and ordinal dates, and nest them when a sentence depends on both, as shown in How do I combine gender and count in one ICU message?. The ICU message editor shows which branch a value selects.

Published Oct 9, 2026 · Markdown version

Related ICU message format questions:

ICU message format guide:

Read the quick guide to ICU message format
Localizely logo
About
Free tools
Boring stuff
  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • Compare
Newsletter
Copyrights 2026 © Localizely