# Pluralization

> The Pluralization is the selection of the correct word form depending on a number, according to the rules of a language.

## How do plural forms work in different languages?

The selection of the correct form of a word for a number. English has two forms, but other languages have up to six, for example 'few' and 'many'. Rules come from `Intl.PluralRules` or message formats, not from `if (n === 1)`.

- Topic: Internationalization
- Type: concept

## Example

Wrong:

```js
const label = `${n} ${n === 1 ? 'file' : 'files'}`;
show(label);
```

Right:

```js
const rules = new Intl.PluralRules(locale);
const forms = messages[locale].files; // { one, few, many, other }
show(`${n} ${forms[rules.select(n)]}`);
```

`Intl.PluralRules` returns the plural category for the locale, and translators supply a form for each one.

## Common mistakes

- Adding 's' to a word for every number other than one.

## Key points

- Plural forms are chosen with `Intl.PluralRules` or an ICU message, not with `n === 1` checks.
- Translation files contain every plural category the language needs.

## Interview questions

### What are the plural categories in CLDR?

There are six: 'zero', 'one', 'two', 'few', 'many' and 'other'. Each language uses a subset, and 'other' always exists.

### How do I format ordinals like 1st, 2nd, 3rd?

Use `new Intl.PluralRules(locale, { type: 'ordinal' })`, which returns categories such as 'one', 'two', 'few' and 'other' for English suffixes.

### Is zero singular or plural in English?

Plural. `Intl.PluralRules` returns 'other' for 0 in English, giving '0 files', while some languages treat zero differently.

## Related cards

- [Intl.PluralRules](https://wonderium.dev/js/intl-plural-rules.md)
- [ICU Message Format](https://wonderium.dev/web/icu-message-format.md)
- [i18n](https://wonderium.dev/web/i18n.md)

---

- Level: [Web Platform](https://wonderium.dev/web.md)
- HTML version: https://wonderium.dev/web/pluralization
- Last updated: 2026-11-25
