Course contentsShow
← JavaScript
Lesson 2231 of 2,72346. InternationalizationFree lesson

Cardinal vs Ordinal Plurals

Distinguish between cardinal plurals (1 item, 2 items) and ordinal plurals (1st, 2nd, 3rd) using the type option.

Cardinal vs Ordinal Plurals

You'll learn how to distinguish between counting quantities (cardinal: "1 item, 2 items") and expressing order or rank (ordinal: "1st, 2nd, 3rd") using the type option in Intl.PluralRules.

The Core Idea

Not all plurals are about counting things. Sometimes you need to express position or rank. The Intl.PluralRules API supports both through its type option:

  • Cardinal plurals (default) describe how many: "1 apple," "2 apples," "5 apples"
  • Ordinal plurals describe position in a sequence: "1st place," "2nd place," "3rd place," "21st century"

Different languages have different ordinal rules. In English, we add "-st," "-nd," "-rd," or "-th" based on the number. Other languages may have entirely different patterns.

Using the type Option

When creating your PluralRules instance, pass type: "ordinal":

const cardinalRules = new Intl.PluralRules('en-US', { type: 'cardinal' });
const ordinalRules = new Intl.PluralRules('en-US', { type: 'ordinal' });

// Cardinal (counting)
cardinalRules.select(1);  // "one"
cardinalRules.select(2);  // "other"

// Ordinal (position)
ordinalRules.select(1);   // "one"   (1st)
ordinalRules.select(2);   // "two"   (2nd)
ordinalRules.select(3);   // "few"   (3rd)
ordinalRules.select(4);   // "other" (4th)
ordinalRules.select(21);  // "one"   (21st)
ordinalRules.select(22);  // "two"   (22nd)

Notice how ordinal rules detect patterns like "21st" (ends in 1) and "22nd" (ends in 2), while cardinal rules simply count quantity.

Key Takeaway: Use type: "cardinal" (default) when counting items and type: "ordinal" when expressing rank, position, or sequence order—the select() categories will adjust to match language-specific ordinal patterns.