Plurals

Every way translation files spell a plural

Languages disagree about counting: English has two plural forms, Polish four, Arabic six, Japanese one. CLDR, Unicode’s locale data project, names the categories (zero, one, two, few, many, other) and the rules for when each applies. What translation files disagree about is how to write the forms down, and six conventions cover nearly everything you will meet.

Each guide explains how the encoding works, where it came from, and shows the same plural in English, Polish and Arabic, in JSON and in the other file formats that can carry it.

The encodings

Six conventions, one CLDR underneath

Formats without plural syntax of their own, like JSON, YAML and properties files, borrow one of these conventions to carry the forms.

Encoding Shape Forms At home in
ICU MessageFormat One string, branches inside All six CLDR forms react-intl, ARB, Java
Category map One subkey per CLDR form All six CLDR forms Rails i18n, TMS exports
Array Forms in CLDR order All six, unlabeled Ad hoc pipelines
i18next v3 Base key plus _plural one and other Legacy i18next apps
i18next v4 One suffixed key per form All six CLDR forms i18next since 2021
Symfony pipes Forms joined by | All six, by position Symfony Translation

Native syntaxes

Formats with plurals built in

Some file formats carry plurals in their own syntax instead of borrowing an encoding. Their guides live with the formats themselves.

Conversion

They all meet in the middle

Because every convention ultimately names the same CLDR categories, plurals can move between encodings without losing forms; the only lossy step is a convention that cannot express a category at all, like the two slot i18next v3 suffix. locamorph normalizes every plural to CLDR forms on import and writes whichever encoding your project selects on export, which is what makes cross format conversion safe.

Plurals handled, whatever the spelling

Import files in any of these conventions and translators see clean per form fields; exports write the convention your stack expects.