coderef

Intl.PluralRulesBaseline · Widely available

The Intl.PluralRules API creates a locale-aware object that tells you which of the language's pluralization rules apply based on a given number.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 19, 2019. Widely available since Mar 19, 2022.

Browser support

DesktopChrome
1–62Not supported
63+Supportedsince Dec 6, 2017
Current: 155
Edge
12–17Not supported
18+Supportedsince Oct 2, 2018
Current: 154
Firefox
1–57Not supported
58+Supportedsince Jan 23, 2018
Current: 157
Safari
1–12.1Not supported
13+Supportedsince Sep 19, 2019
Current: 27
MobileChrome Android
18–62Not supported
63+Supportedsince Dec 5, 2017
Current: 155
Firefox Android
4–57Not supported
58+Supportedsince Jan 22, 2018
Current: 157
Safari iOS
1–12.2Not supported
13+Supportedsince Sep 19, 2019
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: PluralRules.

Feature detection

JS · check before using
if ("PluralRules" in Intl || ("prototype" in Intl && "PluralRules" in Intl.prototype)) {
  // Intl.PluralRules is available
}

Sub-features

Support for each part of the feature (11). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
Intl.PluralRules63185813635813
Intl.PluralRules.PluralRules63185813635813
Intl.PluralRules.PluralRules.options_parameter10610611615.410611615.4
Intl.PluralRules.PluralRules.options_parameter.options_roundingIncrement_parameter✕✕11617.2✕11617.2
Intl.PluralRules.PluralRules.options_parameter.options_roundingMode_parameter11711711617.211711617.2
Intl.PluralRules.PluralRules.options_parameter.options_roundingPriority_parameter10610611615.410611615.4
Intl.PluralRules.PluralRules.options_parameter.options_trailingZeroDisplay_parameter✕✕116✕✕116✕
Intl.PluralRules.resolvedOptions63185813635813
Intl.PluralRules.select63185813635813
Intl.PluralRules.selectRange10610611615.410611615.4
Intl.PluralRules.supportedLocalesOf63185813635813