A localization-friendly syntax that lets developers write dynamic, multilingual messages using placeholders and logic rules.
ICU Message Format is part of the International Components for Unicode (ICU) suite. It is widely used in localization to create dynamic, context-aware messages that adapt to grammatical and structural rules across languages. Instead of hardcoding separate strings for each scenario, developers use ICU Message Format to define templates that automatically adjust based on variables such as quantity, gender, or other contextual inputs.
This system is essential in software localization, where content like notifications, user messages, and UI text often depends on dynamic data. It allows translators to focus on conveying the intended meaning without restructuring sentences manually for every case or language.
For example, in English, the sentence “You have 1 new message” changes to “You have 5 new messages” depending on the number. In other languages, the change might involve gender-specific words, different sentence structures, or alternate verb conjugations.
ICU Message Format enables this by using placeholders and conditional logic, ensuring that messages are grammatically correct and natural-sounding in all supported languages.
"You have {NUM_MESSAGES, plural, one {# new message} other {# new messages}}."