JavaScript Intl.PluralRules() Constructor

Beginner
5 min read
Updated: Nov 2026
3 examples
Constructor

Definition

new Intl.PluralRules(locales, options) builds a helper that answers which plural category a number belongs to. Call select(n) to get a string such as "one" or "other".

Use cardinal rules for counts (1 item / 2 items) and type: "ordinal" for ranks (1st, 2nd, 3rd).

Remember
new Intl.PluralRules(locales, options)
rules.select(n)

cardinal → "one", "other", ...
type: "ordinal" → "one", "two", "few", "other", ...

Syntax

Create PluralRules, then call select with a number.

JavaScript
const rules = new Intl.PluralRules("en");
console.log(rules.select(1));
console.log(rules.select(2));
CallWhat it does
new Intl.PluralRules("en")English cardinal categories.
rules.select(1)Returns "one" in English.
rules.select(2)Returns "other" in English.
{ type: "ordinal" }Categories for 1st, 2nd, 3rd-style ranks.

A standard JavaScript constructor on the Intl object: create one with new Intl.PluralRules(). No import required. Siblings: Intl.getCanonicalLocales(), Intl.supportedValuesOf(), Intl.Collator(), Intl.DateTimeFormat(), Intl.DisplayNames(), Intl.DurationFormat(), Intl.ListFormat(), Intl.Locale(), Intl.NumberFormat(), Intl.RelativeTimeFormat(), Intl.Segmenter().

Library declarations
JavaScript
// ECMAScript 2018 — Intl.PluralRules (widely available)
new Intl.PluralRules(locales, options)
rules.select(n)

// options.type : "cardinal" | "ordinal"
// select returns: "zero" | "one" | "two" | "few" | "many" | "other"

Parameters

ParameterDescription
localesOptional. Locale string or list, such as "en" or "fr".
optionsOptional. Mainly type: cardinal (default) or ordinal.
nFor select: the number to classify.

Return Value

Return ValueDescription
PluralRules objectFrom the constructor.
stringA plural category name from select.

JavaScript Examples

Example 1 — English Cardinal Categories

In English, 1 is one and most other counts are other.

JavaScript
const rules = new Intl.PluralRules("en");

console.log("1: " + rules.select(1));
console.log("2: " + rules.select(2));
Try It Yourself

How It Works

  1. select(1). English uses the one category for a single item.
  2. select(2). Two (and most other numbers) map to other.
  3. Message maps. Use the category to pick "item" vs "items".

Example 2 — English Ordinal Categories

Ordinal type helps with 1st, 2nd and 3rd endings.

JavaScript
const rules = new Intl.PluralRules("en", { type: "ordinal" });

console.log("1: " + rules.select(1));
console.log("2: " + rules.select(2));
console.log("3: " + rules.select(3));
Try It Yourself

How It Works

  1. type ordinal. Categories follow ranking patterns, not plain counts.
  2. one / two / few. English maps 1 → one, 2 → two, 3 → few for suffixes.
  3. Build labels. Map those names to st, nd and rd in your own strings.

Example 3 — Zero Differs in French and English

French treats 0 as one for cardinal plurals; English treats 0 as other.

JavaScript
const fr = new Intl.PluralRules("fr");
const en = new Intl.PluralRules("en");

console.log("fr 0: " + fr.select(0));
console.log("en 0: " + en.select(0));
Try It Yourself

How It Works

  1. Locale rules differ. Do not hard-code English assumptions for every language.
  2. French zero. 0 uses the one category in French cardinal rules.
  3. English zero. 0 uses other, like most non-1 numbers.

Browser & Runtime Support

Intl.PluralRules is part of the original ES2015 Intl API (or arrived soon after and is now everywhere). Every current browser and Node.js has it.

✓ ES2015 · Widely supported

Intl.PluralRules

Supported in Chrome 24+, Edge 12+, Firefox 29+, Safari 10+, Opera 15+ and Node.js 0.12+. Internet Explorer had partial Intl support only.

ES2015 Standard since
Google Chrome 24+ · Desktop & Mobile
Full support
Microsoft Edge 12+ · Chromium based
Full support
Mozilla Firefox 29+ · Desktop & Mobile
Full support
Apple Safari 10+ · macOS & iOS
Full support
Opera 15+ · Chromium based
Full support
Samsung Internet Recent versions · Android
Supported
Android WebView 24+ · Chromium based
Supported
Node.js 0.12+ · Server runtime
Supported
Deno Supported · JavaScript runtime
Supported
Bun Supported · JavaScript runtime
Supported
Internet Explorer No native support
Not supported
Intl.PluralRules Excellent

Bottom line: Safe to use in every current browser and in Node.js. No feature-detect needed for modern code.

Frequently Asked Questions

It tells you which plural category a number belongs to in a locale, such as one or other.
Cardinal is for counts (1 apple, 2 apples). Ordinal is for ranks (1st, 2nd, 3rd).
No. It returns a category name. Your code chooses the message text for that category.
French plural rules put 0 in the one category. English puts 0 in other.
Possible values include zero, one, two, few, many and other. A locale uses only the ones it needs.

Next: Intl.RelativeTimeFormat

Learn how to format phrases like 3 days ago and in 2 hours.

Intl.RelativeTimeFormat tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

12 people found this page helpful