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
# symbol is replaced with the value of count. The categories (one, other) follow CLDR plural rules for each language.
Select
Useselect to branch on a non-numeric variable, such as grammatical gender:
Ordinals
Useselectordinal 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
- French
- Russian
- Arabic
- Japanese / Chinese
English uses only
one and other.Nesting: plurals inside select
ICU rules can be nested to handle combinations: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.