ICU MessageFormat Translator: Preview Plurals and Selects Across Locales in Your Browser
ICU MessageFormat Translator is a free browser tool for writing ICU plurals and selects, previewing formatted output for the en, th, ar, and ru locales with real plural rules, and catching syntax errors instantly.
Table of Contents
Almost every developer has shipped a message like "You have 1 unread messages" at least once. The problem is not carelessness β plural rules are simply not the same in every language. English needs two forms, Russian needs four, and Arabic needs six. The ICU MessageFormat Translator gives you a fast way to write ICU MessageFormat with plural and select syntax, preview the formatted output per locale, and catch syntax errors instantly β all before your strings reach production.
That matters because ICU MessageFormat is the de facto standard for localizable text. React Intl, FormatJS, vue-i18n, Angular, and Java's MessageFormat all speak it. Yet the syntax is easy to get subtly wrong: a missing closing brace, a forgotten other category, or a # in the wrong branch can break a build or leak raw placeholders to real users.
This guide walks through what the tool does, how plural categories really work across locales such as en, th, ar, and ru, and where the tool fits into an everyday localization workflow.
Why Use ICU MessageFormat Translator?
- Plural rules differ per language. English treats 0 as "other", Russian splits "one" into one, few, and many, and Arabic uses all six CLDR categories. A message that reads perfectly at count 1 can be gibberish at count 11.
- Real CLDR plural rules, not approximations. The preview applies each locale's actual plural category for the value you enter, so what you see for ar or ru is what your users will get.
- Instant syntax checking. Miss a closing brace or forget the mandatory other clause and the tool flags the error immediately β no build step, no recompile.
- Side-by-side locale previews. Compare how en, th, ar, and ru render the same message for the same input in one view, making surprise categories impossible to miss.
- Runs entirely in your browser. Your unreleased strings never leave your machine; there is no upload, no account, and no server round-trip.
- Zero setup. No npm installs or config files. Open the page, paste a message, and start testing.
Key Features
| Feature | What it does |
|---|---|
| Message editor | Write ICU MessageFormat with plural and select syntax directly in the browser |
| Locale previews | See formatted output per locale β en, th, ar, and ru β using real CLDR plural rules |
| Syntax checker | Catches syntax errors instantly while you type or paste |
| Count and select controls | Vary the count or select value and watch every branch of the message render |
| Client-side only | Everything executes locally, so private strings stay private |
Two details matter. The plural preview does not simply substitute numbers β it computes the real CLDR category for each value in each locale, exactly as production i18n libraries do. And because the syntax checker runs on every keystroke, iterating on a tricky nested message takes seconds rather than a compile-and-refresh cycle.
How to Use ICU MessageFormat Translator
- Write your message. Paste an existing key from your translation files or start fresh with something like {count, plural, =0 {No unread messages} one {You have # unread message} other {You have # unread messages}}.
- Pick your locales. Select the locales you actually ship β for example en, th, ar, and ru β so the previews reflect your real audience.
- Vary the count and select values. Step through 0, 1, 2, 5, 11, and 100, and switch select values such as male, female, and other to exercise every branch.
- Read the previews. Each locale renders the final string for the current inputs, so you can confirm wording, spacing, and number placement in context.
- Fix syntax errors instantly. If the checker flags a problem β an unclosed brace, a missing other clause, a stray quote β correct it and confirm every preview renders cleanly before copying the message back into your files.
Plurals Are Not Just Singular and Plural
The core of ICU MessageFormat is the argument syntax: a placeholder in braces naming a variable, its type, and its options. A plural argument looks like {count, plural, ...}; a select argument looks like {gender, select, male {...} female {...} other {...}}.
CLDR defines six plural categories: zero, one, two, few, many, and other. Arabic uses all six because its grammar treats zero, one, two, the numbers 3 to 10, and the numbers 11 to 99 differently, with 100 and above forming yet another group. English needs only one and other. Russian needs one, few, many, and other β and its rules are unintuitive: 1, 21, and 71 are one, but 11 is many and 22 is few. This is why singular-versus-plural thinking fails the moment you add a second language.
The select argument handles grammatical gender and similar fixed choices; many languages decline adjectives or verbs by gender, which makes it unavoidable in natural-sounding copy.
Thai is the useful counterexample. Thai does not inflect nouns for number, so every count maps to the other category. Previewing in th shows identical output for every count, which confirms your Thai string needs no plural branches at all β while your English source still has to work.
Two syntax details trip people up. Inside a plural branch, a bare # is shorthand for the argument's number, so You have # unread messages inserts the count without repeating the placeholder. Literal braces and hashes need an apostrophe escape: '{, '}', and '#'. Forget the escape and the parser either errors out or swallows your punctuation.
The takeaway: verify every category your target locales can produce before you ship. A message checked only at 0 and 1 in English can still fail in Russian at 22 or in Arabic at 15.
Practical Use Cases
Hardening App Translation Files
Before a release, paste your most complex keys β nested plurals, plural-plus-select combinations β into the tool and sweep the counts across all four locales. Discovering that your Arabic string lacks a many branch takes thirty seconds here; otherwise it takes one user report.
Reviewing Translator Strings Before Merge
When a translator returns a file, reviewers can confirm each changed message compiles and renders without running the app. A missing brace buried in a large JSON bundle is invisible in a pull request diff but instantly obvious in the preview.
Multilingual Notification Copy
Emails, push notifications, and SMS templates embed counts constantly: 3 tasks due, 1 new follower. Previewing the exact strings per locale catches awkward cases β such as a Russian count forcing a different verb form β before the template goes live.
Teaching i18n Fundamentals
Introducing a teammate to ICU MessageFormat? The tool doubles as a sandbox: type a broken message, watch the error appear, fix it, and compare the corrected output across locales. Nothing builds intuition for categories and escapes faster.
Best Practices
- Test every plural category. Sweep counts like 0, 1, 2, 5, 11, 21, and 100 for each locale rather than trusting English behavior to transfer.
- Never split a sentence across keys. Keep the whole sentence inside one ICU message so plural and select logic stays coherent in every language.
- Preview ar and ru for surprise categories. These two locales reliably expose messages written with English-only assumptions.
- Keep placeholders meaningful. Name arguments unreadCount, not n, so translators understand the sentence they are localizing.
- Always provide an other branch. It is mandatory in ICU and acts as the safety net for any value you did not anticipate.
- Re-check messages after translator edits. A re-translation can introduce syntax errors just as easily as code can.
Ready to stop guessing how your messages render in other languages? Open the ICU MessageFormat Translator, paste a real key from your project, and preview every plural category across en, th, ar, and ru in seconds.
Related Tools You Might Like:
- JSON Formatter β format, validate, and inspect the translation files that hold your ICU messages.
- Timezone Converter β schedule and verify localized timestamps for your multilingual releases.
- Regex Tester β build and debug the validation patterns that run alongside your localized strings.
Happy localizing!
Frequently Asked Questions
Q: What is ICU MessageFormat? A: It is the message syntax from Unicode's ICU project for formatting locale-aware text. It supports placeholders, plurals, selects, and number and date formatting, and it is used by React Intl, FormatJS, Angular, vue-i18n, and many other i18n libraries.
Q: Does the ICU MessageFormat Translator send my messages anywhere? A: No. The tool runs entirely in your browser, so your strings β including unreleased product copy β never leave your machine.
Q: Why does my message break in Arabic but not in English? A: Arabic uses all six CLDR plural categories (zero, one, two, few, many, other). If your message only defines English-style categories, Arabic counts like 15 or 100 fall through with missing text or a runtime error.
Q: Is ICU MessageFormat still useful for Thai? A: Yes. Thai has no plural distinction, so every count maps to the other category β the tool confirms your Thai string renders identically for all counts and that its placeholders and escapes are correct.