Course contentsShow
← JavaScript
Lesson 1663 of 2,72335. Standard Library and Built-insFree lesson

Locale-Specific Plural Categories

Understand how different locales have different plural rules, from simple two-form systems to complex six-category rules.

Locale-Specific Plural Categories

What you'll learn: How different languages around the world categorize plurals in surprisingly varied ways, from simple "one or many" to complex six-category systems.

Not All Languages Pluralize Like English

You might assume every language works like English: singular ("1 apple") and plural ("2 apples"). But many languages have far more nuanced rules. Arabic, for instance, has six plural categories: zero, one, two, few, many, and other. Polish distinguishes between "few" (2-4 items) and "many" (5+ items). Some languages, like Japanese, barely distinguish plurals at all.

When you use Intl.PluralRules, JavaScript taps into the Unicode CLDR (Common Locale Data Repository), which documents these rules for hundreds of locales.

The Six Possible Categories

The Intl.PluralRules API can return these category names:

  • zero: Used in Arabic for 0 items
  • one: Singular form
  • two: Dual form (Arabic, Welsh)
  • few: Small quantities (Polish, Russian)
  • many: Larger quantities or specific patterns
  • other: The catch-all category

English only uses one and other. Polish uses one, few, many, and other. Arabic uses all six.

Why This Matters

Without understanding these categories, you'd hard-code English-style plurals everywhere ("1 item" / "2 items"), creating grammatically incorrect text for millions of users. By respecting locale-specific plural rules through Intl.PluralRules, your application can display text that feels natural to native speakers worldwide.

The CLDR data handles all the mathematical edge cases too—like how Russian treats numbers ending in 1 (except 11) as singular, or how Polish treats numbers ending in 2-4 (except 12-14) as "few."

Key Takeaway: Different locales have between two and six plural categories, and JavaScript's Intl.PluralRules automatically applies the correct rules for each language using battle-tested Unicode data.