icu-messageformatlisted
Install: claude install-skill ClaudeRegistry/marketplace
# ICU MessageFormat
## Purpose
Provide a standardized reference for writing *correct* ICU MessageFormat, the syntax used by FormatJS/react-intl, react-i18next, vue-i18n, next-intl, and MessageFormat.js, so that translated strings agree grammatically in every target language. The single most common i18n bug is a sentence built by concatenation (`count + ' items'`); it is untranslatable because other languages inflect the noun, reorder the clause, or need more than two plural forms. ICU solves this by putting the grammar *inside* the message where translators can adapt it.
## The Core Rule: One Message, One Argument
Never split a sentence across strings or build it with `+`. A quantity, a name, or a gendered choice becomes an *argument* inside a single message, so the translator controls word order and agreement:
```
Bad: t('cart.count') + ' ' + t('cart.items') // untranslatable
Good: {count, plural, one {# item} other {# items}} // translator owns the plural
```
## Argument Types
| Form | Shape | Use for |
|---|---|---|
| Simple | `{name}` | interpolate a value verbatim |
| `plural` | `{count, plural, one {…} other {…}}` | count-based noun agreement (cardinal) |
| `selectordinal` | `{n, selectordinal, one {#st} two {#nd} few {#rd} other {#th}}` | ranks: "1st", "2nd" |
| `select` | `{gender, select, male {he} female {she} other {they}}` | gender or any enumerated branch |
| `number` | `{price, number, currency}` | locale-formatted numbers/currency/percent |