ICU Message Format
A standard syntax for handling plurals, gender, and complex formatting in translations.
Definition
ICU (International Components for Unicode) Message Format is a widely-adopted standard for defining translatable strings that include variables, pluralization, gender selection, and nested formatting. It allows translators to handle complex linguistic rules that vary between languages. Most modern i18n libraries (react-i18next, vue-i18n, next-intl) support ICU syntax.
Examples
- →{count, plural, one {# item} other {# items}}
- →{gender, select, male {He} female {She} other {They}} liked your post
- →Hello {name}, you have {count, plural, =0 {no messages} one {# message} other {# messages}}
Frequently Asked Questions
Why use ICU format instead of simple string replacement?
Languages have different grammar rules. English has 2 plural forms (1 item, 2+ items), but Russian has 3 and Arabic has 6. ICU format lets translators define all forms needed for their language without code changes.
Which i18n libraries support ICU format?
Most modern libraries support ICU: react-i18next, next-intl, vue-i18n, angular @angular/localize, FormatJS (react-intl), and more. Some require plugins or configuration to enable full ICU support.