Skip to main content
Different languages handle pluralization differently. English has two forms (one item / many items), but Russian has four, Arabic has six, and Chinese has none. Entri uses ICU Message Format to express these rules in a single string that works across all languages.

ICU Message Format basics

ICU (International Components for Unicode) is the industry standard for complex message formatting. It uses a {variable, type, ...options} syntax embedded in your strings.

Plurals

The # symbol is replaced with the value of count. The categories (one, other) follow CLDR plural rules for each language.

Select

Use select to branch on a non-numeric variable, such as grammatical gender:

Ordinals

Use selectordinal for rank-style numbers:

CLDR plural categories

The Unicode CLDR defines up to six plural categories per language: Not all languages use all categories. The other category is always required as the fallback.

Language examples

English uses only one and other.

Nesting: plurals inside select

ICU rules can be nested to handle combinations:
Deeply nested ICU expressions can be difficult for translators to work with. Consider simplifying by splitting into separate keys when nesting goes beyond two levels.

Entri editor support

The Entri translation editor provides dedicated input fields for each plural category required by the target language. Translators never need to write ICU syntax manually — the editor shows the appropriate form fields (e.g., one, few, other for Russian) and assembles the final ICU string automatically. For AI translation, Entri recognizes ICU plural patterns and generates all required plural forms for the target language in a single operation.

Using ICU in your codebase

ICU is supported by popular i18n libraries:

File format compatibility

ICU message format is stored as a plain string in your locale files. Any format that supports arbitrary string values — json-flat, json-nested, yaml, po, arb — can hold ICU strings without modification. The ICU parsing happens at runtime in your i18n library.