Documentation reviewed 23 November 2026.
Quick answer
Plural rules decide which form of a message goes with a number: "1 file" or "5 files" in English, and one of four forms in Russian or six in Arabic. The Unicode CLDR project publishes the rules for each language and names the forms with six categories: zero, one, two, few, many and other. The names are labels, not numbers: in Russian 21 is one, in French 0 is one, and in Latvian 10 is zero. In code, never choose a form with count === 1. Ask a CLDR-backed API such as Intl.PluralRules for the category, store one full sentence per category the language uses, and check every translation for a missing or surplus category.
Who this guide is for
This guide is for developers who write messages with numbers in them, for localization engineers who move plural strings between file formats, and for product leads who need to know why a count on a button is a translation risk. It is also chapter 1 of the short book Notes on Plural Rule Sets.
At the end you will have:
- The six CLDR categories, the operands a rule is written in, and one rule read line by line.
- Tables of sample numbers for 44 languages, all computed with
Intl.PluralRules. - The same plural message written correctly in ten formats, and the traps when converting between them.
- A script that prints the categories each locale needs and flags ICU messages with a missing or surplus category.
- A script that generates test numbers per category, and a list of what to tell translators.
Every category in this guide was computed, not recalled. The tables come from Intl.PluralRules in Node.js 22.15.1, which ships ICU 77.1 and CLDR 47. The newest CLDR release is 49, and the three places where it differs for languages named here are marked.
Part 1: why plurals are a software problem
Most code that prints a count starts like this.
The line makes four assumptions, and each one is false in some language you may ship in.
- There are two forms. Japanese has one, Russian needs four, Arabic needs six.
- The singular is for exactly 1. In French 0 also takes the singular category. In Russian 21, 31 and 101 take the same form as 1.
- The plural is made by adding a suffix. The noun, the verb and the adjectives around the number can all change.
- The number comes first. Word order belongs to the translator, and concatenation takes it away.
Here is what Intl.PluralRules returns for five numbers. A ternary can express the English row and no other.
| Number | English | French | Russian | Polish | Arabic | Japanese |
|---|---|---|---|---|---|---|
| 0 | other | one | many | many | zero | other |
| 1 | one | one | one | one | one | other |
| 2 | other | other | few | few | two | other |
| 5 | other | other | many | many | few | other |
| 21 | other | other | one | many | many | other |
The bug this produces is quiet. Russian does not crash when it gets two forms. It prints "21 файлов" where "21 файл" is correct, on every screen with a count, and nobody on an English-speaking team sees it. That is why plurals belong in the build and the test suite and not in a grammar footnote.
A plural is a function from a number to a category, and the function is different in every language. Code picks the number, CLDR picks the category, the translator writes one sentence per category.
Part 2: the six categories and what they are not
CLDR limits plural categories to six names: zero, one, two, few, many and other. The specification (Unicode Technical Standard 35, Part 3) states that other is mandatory, and every language has it. A language uses between one and six of them.
The names mislead. The CLDR plural rules page says so directly: the categories are "only mnemonics".
| Category | What it sounds like | What it is in practice |
|---|---|---|
zero | The number 0 | 0 in Arabic and Welsh. In Latvian it is 0, 10 to 20, 30, 40 and so on. In English it does not exist, so 0 is other. |
one | The number 1 | 1 in English. 0 and 1 in French. 1, 21, 31, 101 in Russian. |
two | The number 2 | 2 in Arabic and Hebrew. 2, 102, 202 in Slovenian. |
few | A small amount | 2 to 4 in Czech. Exactly 3 in Welsh. 0 and 2 to 19 in Romanian. |
many | A large amount | 5 to 20 in Russian. Exactly 6 in Welsh. Only decimals in Czech. Whole millions in French. |
other | Everything else | The general form, and the only form in Japanese. In Russian and Polish it is used for decimals only. |
Three consequences follow.
- A category is not a test for a value.
onedoes not mean "the count is 1", so aonemessage that says "One file" without the number is wrong for 21 in Russian. Android's documentation gives the same warning: always include the number inone, because translators need it in languages whereonedoes not mean 1. zerois not "the empty state". English has nozerocategory. To say "No files" for 0 in English you need an exact match (=0in ICU), which is a different mechanism from a category. Part 7 covers it.- The source language's categories say nothing about the target's. An English message has
oneandother. Its Arabic translation needs six.
Never read a category name as a number.one,twoandzeroare labels for "the form this language uses for numbers that behave like 1, 2 or 0".

Part 3: how a rule is written in CLDR
Each language's rules live in one CLDR file, plurals.xml. A rule is a condition on a number. Conditions are checked in the order zero, one, two, few, many, the first true one gives the category, and if none is true the category is other.
The operands
A rule cannot just test the number, because "1" and "1.0" can take different forms. So the specification defines operands that describe the number as it is displayed.
| Operand | Meaning (from UTS 35) | 1 | 1.0 | 1.30 | 1.2c6 |
|---|---|---|---|---|---|
n | The absolute value of the number | 1 | 1 | 1.3 | 1200000 |
i | The integer digits | 1 | 1 | 1 | 1200000 |
v | The number of visible fraction digits, with trailing zeros | 0 | 1 | 2 | 0 |
w | The number of visible fraction digits, without trailing zeros | 0 | 0 | 1 | 0 |
f | The visible fraction digits, with trailing zeros, as an integer | 0 | 0 | 30 | 0 |
t | The visible fraction digits, without trailing zeros, as an integer | 0 | 0 | 3 | 0 |
c | The compact decimal exponent: the power of 10 used in compact formatting | 0 | 0 | 0 | 6 |
e | A deprecated synonym for c | 0 | 0 | 0 | 6 |
1.2c6 is the notation for a number shown in compact form, such as "1.2M". The published rules still use e.
The syntax
=and!=compare an operand, or an operand modulo a number, with a value.i % 10 = 1is true when the integer part ends in 1.a..bis every integer from a to b. A comma separates alternatives:n = 3, 5, 7..15.andbinds more tightly thanor.- After the condition, the file lists samples:
@integer 1, 21, 31, …and@decimal 1.0, 21.0, …. A range of samples is written2~4.
One rule set, line by line
This is Polish in CLDR 47, the data Node 22 ships. CLDR 49 has the same text.
one: the integer part is 1 and there are no visible fraction digits. Only the number 1. Not 1.0, not 21.few: no fraction digits, the last digit is 2, 3 or 4, and the last two digits are not 12, 13 or 14. So 2, 3, 4, 22, 23, 24, 102, but not 12.many: no fraction digits and one of three cases. The number ends in 0 or 1 and is not 1 itself (0, 10, 11, 20, 21, 101). Or it ends in 5 to 9. Or its last two digits are 12 to 14.other: whatever is left. Every integer is already covered, sootheris used only whenvis not 0: 1.5, 2.0, 0.5.
The Russian one rule is v = 0 and i % 10 = 1 and i % 100 != 11. It tests the last digit, where Polish tests the whole number. That one difference is why 21 is one in Russian and many in Polish.
Part 4: cardinals, ordinals and ranges
Everything so far is about cardinal numbers: how many. CLDR has two more kinds of plural data.
Ordinals
Ordinal rules pick the form for a position: 1st, 2nd, 3rd. They live in a separate file, ordinals.xml, and they are a separate rule set per language. English has two cardinal categories and four ordinal ones.
| Ordinal category (English) | Rule | Numbers | Suffix |
|---|---|---|---|
one | n % 10 = 1 and n % 100 != 11 | 1, 21, 101 | st |
two | n % 10 = 2 and n % 100 != 12 | 2, 22 | nd |
few | n % 10 = 3 and n % 100 != 13 | 3, 23 | rd |
other | everything else | 4, 11, 12, 13, 111 | th |
The same names mean different things in the two rule sets. English cardinal one is 1. English ordinal one is 1, 21, 31 and 101. Other languages differ again: computed in Node 22, French ordinals have one for 1 only (the "1er" case), Swedish one covers 1, 2, 21 and 22, Welsh uses all six categories, and Russian, German and Japanese have only other.
Ranges
"1 to 5 files" has two numbers and one noun. CLDR's pluralRanges data maps the categories of the start and the end of a range to the category of the whole range. If a language has no entry for a pair, the specification says the result is the category of the end.
Computed with selectRange in Node 22: English 1 to 2 is other, French 0 to 1 is one, Russian 1 to 5 is many, Russian 1 to 21 is one, Polish 1 to 2 is few.
Part 5: a tour by language family
Each table below was produced by new Intl.PluralRules(locale).select(n) in Node 22.15.1 (CLDR 47). The rule in words is read from the CLDR 47 plurals.xml.
No plural distinction: Japanese, Chinese, Korean, Thai, Vietnamese
The rule set has one category, other. Every number takes it.
| Locale | 0 | 1 | 2 | 21 | 1.5 |
|---|---|---|---|---|---|
ja, zh, ko, th, vi | other | other | other | other | other |
The mistake: writing a one branch that carries meaning, such as "a file" against "5 files", or using a plural to switch between "Inbox" and "Inbox (12)". Android's documentation uses that exact example: in a language with no plural distinction you always get the other string, so the one text never shows.
Version note: in CLDR 49 plurals.xml, Vietnamese moved to the rule set one: i = 0 or n = 1. A runtime on CLDR 47 or 48 reports only other for vi, and one on CLDR 49 reports one and other. Check what your own runtime returns.
Two forms: where does 0 go?
English and German use one for the integer 1 (i = 1 and v = 0). French uses one for 0 and 1 and for anything whose integer part is 0 or 1 (i = 0,1). Hindi uses one for 0 and 1 (i = 0 or n = 1).
| Number | en | de | fr | pt-BR | pt-PT | hi |
|---|---|---|---|---|---|---|
| 0 | other | other | one | one | other | one |
| 1 | one | one | one | one | one | one |
| 2 | other | other | other | other | other | other |
| 1.5 | other | other | one | one | other | other |
CLDR does show a difference inside Portuguese. pt (which pt-BR uses) has one: i = 0..1, like French. pt_PT has its own entry, one: i = 1 and v = 0, like Italian. So 0 is one in Brazilian Portuguese and other in European Portuguese.
The mistake: n === 1 ? singular : plural. It prints the plural for 0 in French and Brazilian Portuguese, and for 1.5 in French. The second mistake is treating pt as one locale for plurals.
Three forms: Latvian and Romanian
Latvian uses zero, one and other. zero is for numbers ending in 0 and for 11 to 19. one is for numbers ending in 1, except 11. Romanian uses one, few and other. few is for 0, for 2 to 19, and for numbers ending in 01 to 19 after a hundred. Every decimal in Romanian is few as well.
| Number | 0 | 1 | 2 | 10 | 11 | 19 | 20 | 21 | 22 | 101 | 111 |
|---|---|---|---|---|---|---|---|---|---|---|---|
lv | zero | one | other | zero | zero | zero | zero | one | other | one | zero |
ro | few | one | few | few | few | few | other | other | other | few | few |
The mistake: reading Latvian zero as "nothing" and writing "No files" in it. That message would then show for 10, 20 and 30 files. In Romanian, the mistake is assuming few stops at a small number: 119 is few and 20 is other.
The East Slavic pattern, and Polish
Russian, Ukrainian and Belarusian share one rule set with four categories. one: ends in 1, not 11. few: ends in 2 to 4, not 12 to 14. many: ends in 0 or 5 to 9, or in 11 to 14. other: decimals. Polish has the same four names and a different one.
| Number | 0 | 1 | 2 | 5 | 11 | 12 | 21 | 22 | 25 | 101 | 111 | 1.5 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
ru, uk | many | one | few | many | many | many | one | few | many | one | many | other |
pl | many | one | few | many | many | many | many | few | many | many | many | other |
In Russian: 1 файл, 2 файла, 5 файлов, 21 файл, 1,5 файла. In Polish: 1 plik, 2 pliki, 5 plików, 21 plików, 1,5 pliku.
The mistake: copying a Russian setup to Polish, or the reverse. The category names match, so nothing fails, and 21, 31 and 101 come out wrong. The second mistake is leaving other out because "it is never used". It is used for every decimal, and the ICU parser used in Part 10 rejects a plural without it.
Czech and Slovak
one is 1. few is 2, 3 and 4 and nothing else. many is any number with visible fraction digits. other is the rest, which means 0 and every integer from 5.
| Number | 0 | 1 | 2 | 4 | 5 | 21 | 22 | 100 | 1.5 |
|---|---|---|---|---|---|---|---|---|---|
cs, sk | other | one | few | few | other | other | other | other | many |
The mistake: assuming a Slavic language follows the Russian modulo pattern. In Czech 22 is other, not few, and many has nothing to do with large numbers.
Lithuanian
one: ends in 1, not 11. few: ends in 2 to 9, not 12 to 19. many: has a fraction. other: ends in 0, or is 11 to 19.
| Number | 0 | 1 | 2 | 9 | 10 | 11 | 20 | 21 | 22 | 101 | 1.5 |
|---|---|---|---|---|---|---|---|---|---|---|---|
lt | other | one | few | few | other | other | other | one | few | one | many |
Android's documentation uses Lithuanian to show why the number must be in the sentence: the singular form is used for 1 and for 101, so "1 knyga" and "101 knyga" share one string.
Slovenian and the dual
Slovenian has a grammatical dual, so it uses two. The rule looks at the last two digits: one for 01, two for 02, few for 03 and 04 and for every decimal, other for the rest.
| Number | 0 | 1 | 2 | 3 | 4 | 5 | 101 | 102 | 103 | 105 | 1.5 |
|---|---|---|---|---|---|---|---|---|---|---|---|
sl | other | one | two | few | few | other | one | two | few | other | few |
The ICU documentation gives the four forms for "dog": pes, psa, psi, psov.
The mistake: treating two as the value 2. In Slovenian 102 and 202 are two.
Celtic languages: Welsh and Irish
Welsh uses all six categories and each of the first five is a single number: 0, 1, 2, 3 and 6. Irish uses five: one for 1, two for 2, few for 3 to 6, many for 7 to 10, other for 0 and from 11.
| Number | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 100 |
|---|---|---|---|---|---|---|---|---|---|---|---|
cy | zero | one | two | few | other | other | many | other | other | other | other |
ga | other | one | two | few | few | few | few | many | many | other | other |
The mistake: reading few and many as sizes. In Welsh few is exactly 3 and many is exactly 6, so 4, 5 and 7 are other.
Semitic languages: Arabic and Hebrew
Arabic uses all six, and two of the rules are modulo 100.
| Number | 0 | 1 | 2 | 3 | 10 | 11 | 99 | 100 | 101 | 102 | 103 | 111 | 1000 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ar | zero | one | two | few | few | many | many | other | other | other | few | many | other |
he | other | one | two | other | other | other | other | other | other | other | other | other | other |
Because of the modulo, the pattern repeats in every hundred: 103 is few again and 111 is many. The numbers 100, 101 and 102 match nothing and fall to other. Hebrew in CLDR 47 has three categories: one, two and other.
The mistake: assuming other is the form for large numbers and many for the largest. In Arabic 11 is many and 1000 is other. The second mistake is giving Arabic fewer than six forms because the source had two.
Maltese
Maltese resembles Arabic with two differences: there is no zero, and 0 is few. few is 0 and numbers ending in 03 to 10, many is numbers ending in 11 to 19.
| Number | 0 | 1 | 2 | 3 | 10 | 11 | 19 | 20 | 100 | 101 | 103 | 111 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
mt | few | one | two | few | few | many | many | other | other | other | few | many |
The `many` for millions in French, Spanish and Italian
French, Spanish, Italian, Portuguese and Catalan list three categories, not two. The third is many, with this rule.
The first line: the number is not in compact form, it is not zero, it has no fraction digits, and it is an exact multiple of one million. The second line: the number is in compact form with an exponent of 6 or more. It exists for phrases such as the French "1 million de fichiers", where a word is added after "million".
| Number | 1000 | 999999 | 1000000 | 1000001 | 1500000 | 2000000 | 1000000000 |
|---|---|---|---|---|---|---|---|
fr, es, it, pt, ca | other | other | many | other | other | many | many |
The surprise: a checker that asks these locales for their categories gets one, many, other, and a French message with only one and other is reported as incomplete. The report is correct. Give many a string, even if it repeats other.
Node 22.15.1 does not apply the notation: "compact" option in Intl.PluralRules (it is absent from resolvedOptions()), so the compact half of the rule was not computed for this guide. MDN documents the option and shows it with French.

Part 6: decimals, and why 1.0 is not 1
In English you write "1 star" and "1.0 stars". The value is the same and the form is not, which is what operand v is for. The English rule is i = 1 and v = 0, so the moment a fraction digit is visible the category is other.
A JavaScript number does not remember its trailing zeros, so pass the same digit options to Intl.PluralRules that you pass to Intl.NumberFormat. In this table the columns after the first were computed with minimumFractionDigits: 1.
| Locale | 1 | 1.0 | 1.5 | 0.5 | 2.0 | 5.0 |
|---|---|---|---|---|---|---|
en, de, it | one | other | other | other | other | other |
es | one | one | other | other | other | other |
fr | one | one | one | one | other | other |
ru, pl | one | other | other | other | other | other |
cs, sk | one | many | many | many | many | many |
lt | one | one | many | many | few | few |
lv | one | one | other | other | other | other |
ro, sl | one | few | few | few | few | few |
da | one | one | one | one | other | other |
ar | one | one | other | other | two | few |
he | one | other | other | one | other | other |
Spanish keeps one for 1.0 because its rule is n = 1, which ignores v. French keeps one for 1.5 because its rule looks only at the integer part.
If a count can be shown with decimals (ratings, hours, kilometres, gigabytes), the plural category must be computed with the same fraction digits the user sees. A selector that receives 1 while the screen shows "1.0" picks the wrong form in English.
In Node 22.15.1, new Intl.PluralRules("en").select("1.0") returned one: the string was converted to a number first. Use the digit options, not a string.
Part 7: how each format encodes plurals
The same message, "N files" in Russian, in each format. The Russian forms are файл (one), файла (few), файлов (many) and файла (other, for decimals).
ICU MessageFormat
pluralselects by the cardinal rules.selectordinalhas the same grammar and selects by the ordinal rules.=0is an explicit value. ICU matches the number against explicit values first, then against category keywords. UTS 35 states that the explicit 0 and 1 cases apply to the exact values 0 and 1 and take precedence overzeroandone.#is replaced by the number, formatted for the locale. With an offset it is the number minus the offset.otheris required.offset:1subtracts 1 before the category is chosen and before#is printed. It exists for "Ana and 2 others".
All three messages were parsed with @formatjs/icu-messageformat-parser 3.5 and evaluated for this guide. The Russian message gave "Нет файлов", "1 файл", "2 файла", "5 файлов", "21 файл", "11 файлов" and "1,5 файла".
=1andoneare different selectors.{count, plural, =1 {# файл} other {# файлов}}in Russian printed "21 файлов" in the test, because 21 is not the value 1. Useonefor the category, and=0or=1only for wording that belongs to that exact number.
gettext PO
The header belongs to the file, not to gettext. nplurals is the number of forms and plural is a C expression over n that returns an index from 0. The expression above is the one the gettext manual lists for Russian.
The indexes are not CLDR categories.
- An index means what the header's expression makes it mean. Running the manual's expressions against
Intl.PluralRulesfor 0 to 1000:msgstr[2]is CLDRmanyin a Russian file and CLDRotherin a Czech or Lithuanian file. - The manual's expressions do not always split numbers the way CLDR does. Its Latvian expression puts only 0 in the third form, where CLDR
zeroalso covers 10 to 20. Its Irish expression has three forms, where CLDR has five categories. nis an integer. A three-form Russian PO file has no slot for the decimal form that CLDR callsother.
Android `<plurals>`
The quantity values are the six CLDR names. The Android documentation states that selection is by grammatical necessity: an English zero item is ignored even when the quantity is 0. In Compose the call is pluralStringResource. From API 24 the ICU MessageFormat class is available as an alternative.
Apple `.stringsdict` and String Catalogs
Apple's documentation says that from Xcode 15 String Catalogs are the recommended way to localize plurals, and that .stringsdict is for earlier versions. In a catalog you Control-click the key, choose Vary by Plural, and Xcode adds the plural forms for each language. A message with two numbers gets one variable dictionary per number. Apple's page also notes that English requires only one and other and that zero is optional there, which differs from Android.
Flutter ARB
ARB values hold ICU-style plural messages. Flutter's guide writes the options as =0, =1, =2, few, many and other, and says only other is required. The Dart intl package's Intl.plural takes zero, one, two, few, many and a mandatory other, plus a precision argument for the visible fraction digits.
i18next suffixes
One key per category, with the category as a suffix, and the number passed as count: t("file", { count: 5 }). The i18next documentation says the form is chosen with Intl.PluralRules, that a _zero key wins for a count of 0 where it exists, and that ordinals use keys such as _ordinal_one with ordinal: true. More in the i18next best practices guide.
Vue I18n pipes
Choices are separated by | and selected by position with $t("file", 5). The Vue I18n guide says the default selection does not apply to all languages, names Slavic languages, and shows a custom function passed as pluralRules (Composition API) or pluralizationRules (Options API). The order above matches the Russian example in that guide: zero, one, few, many.
Rails and Laravel
Rails looks up a sub-key by category with I18n.t("files", count: 5). The Rails guide shows that the default algorithm knows only one and other (plus an optional zero for a count of 0), and that locale-specific rules come from the I18n Pluralization backend or the rails-i18n gem. Laravel separates forms with |, allows exact values and ranges such as {0} and [2,*], and fills :count.
Fluent
Fluent selectors match a number against CLDR plural categories. The variant marked * is the default and is required. A literal number is an exact match, and NUMBER($pos, type: "ordinal") selects by ordinal rules.
What each format can express
| Format | Forms identified by | Exact-value match | Ordinals | Decimal form |
|---|---|---|---|---|
| ICU MessageFormat | CLDR category | Yes, =N | selectordinal | Yes |
| Fluent | CLDR category | Yes, [1] | NUMBER(type: "ordinal") | Yes |
| Flutter ARB | ICU plural message | Yes, =0, =1, =2 | Not covered here | precision in Intl.plural |
| i18next JSON | CLDR category suffix | _zero for 0 | _ordinal_ suffixes | Not checked |
| Android XML | CLDR category | No | No | Not checked |
| Apple stringsdict, String Catalog | CLDR category | No | No | Not checked |
| Rails YAML | Category key | zero for 0 in the default rule | No | Not checked |
| gettext PO | Index from the header expression | No | No | No, n is an integer |
| Vue I18n, Laravel | Position in a pipe list | Laravel: {0}, ranges | No | Not checked |
Conversion pitfalls
- PO to anything with categories. Map each index through the file's own
Plural-Formsexpression, per language. Do not assume index 2 ismany. - Categories to PO. The decimal category has nowhere to go, and the number of forms must match
nplurals. - ICU to Android or Apple.
=0and=1have no counterpart, andoffsethas none anywhere else. Move that logic into code or split the message into two keys. - Exact zero. ICU
=0, i18next_zero, Railszeroand Laravel{0}all mean "the number 0". CLDRzeromeans a category, which in Latvian includes 10 and 20. Converting one into the other changes behaviour. - Pipes. Vue and Laravel forms are positional. A translator who adds or reorders a segment changes which numbers it applies to.
- Two-form sources. Any converter that copies the source's shape gives Russian two forms. The target's category list must come from CLDR, not from the source file.
Part 8: design decisions that follow
Never concatenate. Store the whole sentence in each form. The translator needs to move the number, change the verb and change the adjective.
Keep the number inside the sentence. A one form without the number breaks for 21 in Russian and 101 in Lithuanian. If the design calls for "One file", use =1 for that wording and keep one {# file} for the category.
Use an exact match for zero. "No files" is a different sentence, not a plural form. Write =0 {No files} in formats that support it, and an if in code where they do not.
Avoid two numbers in one message, or nest correctly. "5 photos in 2 albums" needs a form for every pair of categories. Nest the second plural inside each branch of the first and write full sentences at the leaves. Inside the inner plural # means the inner number, so print the outer one by name.
That count is the argument for splitting such a message into two sentences, or for a neutral layout such as "Photos: 5. Albums: 2". Android's documentation recommends the same kind of quantity-neutral wording where the style allows.
Gender plus plural: select outside, plural inside. The ICU guide advises putting complex arguments at the outermost level, writing full sentences in the sub-messages, and placing select outside plural.
Lists and units are not plural messages. Do not build "5 kilometers" from a plural key. Intl.NumberFormat with style: "unit" and unitDisplay: "long" returned "5 kilometers", "5 километров" and "3 километра" in Node 22. For "Ana, Ben, and Chen" use Intl.ListFormat.
Give the UI room for the longest form. A language with four forms has four lengths. Size the control for the longest form of the longest language, with a large number in it, not for the English one.
One message, one number, one full sentence per category. Every departure from that multiplies the number of strings a translator must get right.
Part 9: runtime APIs
JavaScript: Intl.PluralRules
MDN lists Intl.PluralRules as widely available since September 2019 and selectRange since August 2023. In Node 22.15.1 pluralCategories for Arabic came back as few, many, one, two, zero, other, so do not rely on its order.
ICU4J and ICU4C
ICU is the reference implementation of CLDR. In ICU4J, PluralRules.forLocale(locale) returns the cardinal rules and an overload takes a PluralType for ordinals. select(double) returns the keyword, select(FormattedNumber) takes a formatted number so that visible digits count, and getKeywords() lists the categories. ICU4C mirrors this with PluralRules::forLocale(locale, type, status) and a UPluralType, and its select also accepts a FormattedNumberRange for ranges. MessageFormat in both wraps these for plural and selectordinal arguments.
Platform equivalents
| Platform | API named in its documentation |
|---|---|
| Android | getQuantityString(), pluralStringResource() in Compose, android.icu.text.MessageFormat from API 24 |
| Apple | String Catalog plural variations, or .stringsdict with NSStringPluralRuleType |
| Flutter and Dart | Generated methods from ARB, Intl.plural() in the intl package |
| i18next | t(key, { count }), with ordinal: true for ordinals |
| Rails | I18n.t(key, count: n) |
| Laravel | trans_choice(key, n) |
| Fluent | Selector expressions, NUMBER() for ordinals |
Part 10: a checker for ICU messages
This script takes a folder of <locale>.json files whose values are ICU messages. It prints the categories each locale needs, then reports every plural that lacks a required category or uses one the language does not have. Exact selectors such as =0 are ignored, because they are not categories.
It was run on six sample files, each with a files and a place message. Five of them carried a planted defect: Russian and French copied the English shape, Japanese kept a one branch, Polish left out other, and Arabic had an unclosed brace.
The script answers for the CLDR version in your runtime. Run it on the Node version that CI uses, and expect the list for a language to change when the runtime moves to a newer CLDR. For the other static checks that belong next to this one, see React localization CI checks.
Part 11: testing plurals
A test that renders a message with 1 and 2 proves the English rule. Each language needs at least one number per category, plus the numbers where the rule changes.
| Language | Boundary numbers to test |
|---|---|
| English | 0, 1, 2, and 1.0 if decimals can appear |
| French | 0, 1, 1.5, 2, 1000000 |
| Russian, Ukrainian | 0, 1, 2, 4, 5, 11, 12, 14, 21, 22, 25, 101, 111, 1.5 |
| Polish | 0, 1, 2, 5, 12, 21, 22, 101, 112, 1.5 |
| Czech, Slovak | 0, 1, 2, 4, 5, 1.5 |
| Lithuanian | 0, 1, 2, 9, 10, 11, 21, 1.5 |
| Latvian | 0, 1, 2, 10, 11, 21 |
| Romanian | 0, 1, 2, 19, 20, 101, 120 |
| Slovenian | 1, 2, 3, 4, 5, 101, 102, 103 |
| Arabic | 0, 1, 2, 3, 10, 11, 99, 100, 102, 103 |
| Welsh | 0, 1, 2, 3, 4, 6, 7 |
| Japanese, Chinese, Korean | 1 and 2, to confirm the same string appears |
Do not maintain such a table by hand. Generate it from the runtime.
Feed those numbers into a unit test that formats each plural message and asserts that the output contains the number and is not empty. For screenshots, render each plural message once per category with the largest sample, so the longest form is the one that gets measured. The wider test plan is in automated localization QA.
Part 12: what translators need to be told
A translator sees a string, not your code. Put the following in the key's description or the translation brief.
- What the number counts. "Number of files in the folder", not "count".
- The range and type of the number. Can it be 0? Can it be a decimal? Can it reach millions? This decides which forms will ever show.
- That the forms are CLDR categories. Say that
oneis the form for numbers that behave like 1 in their language, and give the sample numbers from the script above. - That the number must stay in every form.
#,%dor{count}appears inonetoo. - That keywords are not text.
one,few,plural,=0and the argument name stay in English. - Which forms are exact. If
=0is present, it is for the number 0 only, and the category forms still have to be complete. - The room available. The pixel or character limit applies to the longest form.
- What agrees with the number. If the sentence has a gender or a second number, say so, and show the nesting.
Part 13: what AI translation gets wrong with plurals
Machine translation of a plural message is translation of a small program. The failure modes below are structural, so a script can catch them. They were not measured as rates for this guide.
| Failure | Example | How to catch it |
|---|---|---|
| The source's shape is copied | A Russian message with only one and other | Compare the keywords with the target's categories (Part 10) |
| A category the language lacks is added | one in Japanese, zero in English | The same comparison, for surplus keywords |
| A keyword or argument name is translated | otro {...}, {cantidad, plural, ...} | Parse the message, compare argument names with the source |
| The number is replaced by a digit or a word | one {1 файл}, which is wrong for 21 | Check that each category form contains # or the placeholder |
=1 is used in place of one | Correct for 1, wrong for 21 and 101 | Flag =1 where the locale's one covers more than the value 1 |
| Braces or apostrophes break | An unclosed {, or an apostrophe that starts ICU quoting | Parse every output before it is written |
| All forms are identical | The few and many text is the same as one | Warn when all forms of a multi-form language match |
| The grammar of a form is wrong | The right number of forms with the wrong noun ending | No script. A native speaker reads the forms next to the sample numbers |
The first seven are mechanical. Run the parser and the category comparison on every machine-translated string, and reject or retry before the string reaches a file. The last one is linguistic, and it is the reason a review pass with real numbers is still worth doing for the languages with four or more forms.
Part 14: quick reference for 44 languages
Computed in Node 22.15.1 (CLDR 47). The middle column is the cardinal category for 0, 1, 2, 5 and 21.
| Language | Code | Cardinal categories | 0 / 1 / 2 / 5 / 21 | Ordinal categories |
|---|---|---|---|---|
| English | en | one, other | other / one / other / other / other | one, two, few, other |
| Chinese | zh | other | other / other / other / other / other | other |
| Hindi | hi | one, other | one / one / other / other / other | one, two, few, many, other |
| Spanish | es | one, many, other | other / one / other / other / other | other |
| French | fr | one, many, other | one / one / other / other / other | one, other |
| Arabic | ar | zero, one, two, few, many, other | zero / one / two / few / many | other |
| Bengali | bn | one, other | one / one / other / other / other | one, two, few, many, other |
| Portuguese (Brazil) | pt-BR | one, many, other | one / one / other / other / other | other |
| Portuguese (Portugal) | pt-PT | one, many, other | other / one / other / other / other | other |
| Russian | ru | one, few, many, other | many / one / few / many / one | other |
| Urdu | ur | one, other | other / one / other / other / other | other |
| Indonesian | id | other | other / other / other / other / other | other |
| German | de | one, other | other / one / other / other / other | other |
| Japanese | ja | other | other / other / other / other / other | other |
| Turkish | tr | one, other | other / one / other / other / other | other |
| Korean | ko | other | other / other / other / other / other | other |
| Vietnamese | vi | other | other / other / other / other / other | one, other |
| Italian | it | one, many, other | other / one / other / other / other | many, other |
| Thai | th | other | other / other / other / other / other | other |
| Polish | pl | one, few, many, other | many / one / few / many / many | other |
| Ukrainian | uk | one, few, many, other | many / one / few / many / one | few, other |
| Dutch | nl | one, other | other / one / other / other / other | other |
| Romanian | ro | one, few, other | few / one / few / few / other | one, other |
| Greek | el | one, other | other / one / other / other / other | other |
| Czech | cs | one, few, many, other | other / one / few / other / other | other |
| Slovak | sk | one, few, many, other | other / one / few / other / other | other |
| Swedish | sv | one, other | other / one / other / other / other | one, other |
| Hungarian | hu | one, other | other / one / other / other / other | one, other |
| Hebrew | he | one, two, other | other / one / two / other / other | other |
| Danish | da | one, other | other / one / other / other / other | other |
| Finnish | fi | one, other | other / one / other / other / other | other |
| Norwegian Bokmål | nb | one, other | other / one / other / other / other | other |
| Bulgarian | bg | one, other | other / one / other / other / other | other |
| Croatian | hr | one, few, other | other / one / few / other / one | other |
| Serbian | sr | one, few, other | other / one / few / other / one | other |
| Lithuanian | lt | one, few, many, other | other / one / few / few / one | other |
| Latvian | lv | zero, one, other | zero / one / other / other / one | other |
| Slovenian | sl | one, two, few, other | other / one / two / other / other | other |
| Persian | fa | one, other | one / one / other / other / other | other |
| Filipino | fil | one, other | one / one / one / one / one | one, other |
| Welsh | cy | zero, one, two, few, many, other | zero / one / two / other / other | zero, one, two, few, many, other |
| Irish | ga | one, two, few, many, other | other / one / two / few / other | one, other |
| Maltese | mt | one, two, few, many, other | few / one / two / few / other | other |
| Catalan | ca | one, many, other | other / one / other / other / other | one, two, few, other |
Changes in CLDR 49, read from its data files: Vietnamese cardinals gain one, and the ordinal rules for Spanish and Bulgarian gain categories. A runtime on CLDR 49 will print different rows for those three.

Doing this with Transglot
Transglot stores a plural string as one form per CLDR category of each language, and its plural check is one of four that run on every translated string. This section follows the plural forms page and the file formats pages.
Where plural keys come from. A key is a plural key when its source file says so. The formats that carry plurals as separate forms are Android XML (<plurals>), Apple .stringsdict and String Catalogs (plural variations), Flutter ARB (ICU plural messages), gettext PO (msgid_plural), and CSV and XLSX (one row per form, named key[category]). A key can also be marked plural by hand, and it can be switched between plural and simple only while it has no translations.
How they are checked. An AI translation of a plural key writes every form the target language needs. A plural key that is missing a form its language needs fails the plural check. The engine retries once, and if the string still fails it is refused and stays untranslated. The run reports it. Details are on the quality checks page.
How import protects them. A plural entry is written only to a plural key and a simple entry only to a simple key. A mismatch is skipped and reported as a conflict. In most plural formats a category the locale does not use, such as few in an English file, is an import error.
The limits, format by format:
| Format | What the documentation says |
|---|---|
JSON (json_flat, json_nested) | No plural construct. An ICU plural inside a value is an ordinary string, stored whole and written back unchanged. The checks read it as ICU according to the project's Message syntax setting, under Settings, then Checks. i18next suffix keys are ordinary keys, each translated on its own, and you add _few or _many keys yourself. Plural keys created in Transglot are left out of a JSON export and counted. |
Flutter ARB (flutter_arb) | A value shaped like an ICU plural message becomes a plural key. A plural with an exact selector such as =0{...} is kept whole as an ordinary string, and so is a select message. On export the variable is always count. |
gettext PO (gettext_po) | msgstr[N] is mapped to a category by reading the Plural-Forms header. A three-form Russian, Ukrainian or Polish file maps to one, few and many, and other is filled from many. An unrecognised expression falls back to first form as one and last as other, with a warning. |
Android XML (android_xml) | Each quantity must be a category the locale uses. A zero or two item in an English file is an import error. |
Apple (ios_stringsdict, ios_xcstrings) | The stringsdict format key is not kept: text around the variable is not carried, so it belongs in each plural form. In a String Catalog, device and width variations and substitutions are skipped with a warning. |
| XLIFF 1.2 and 2.0 | No plural construct. Plural keys are left out of an XLIFF export, and an ICU plural inside a unit is an ordinary string. |
| YAML, Laravel PHP and JSON | No plural construct. Rails-style one and other keys are ordinary nested keys. Laravel pipe strings are stored as one value. |
So for a React or Next.js project on JSON, the plural is an ICU string and the safeguard is the Message syntax setting. For mobile projects the plural is a real plural key with one box per category in the editor. The CLI, the GitHub Action and the API start on the Starter plan, and the Free plan works in the browser console. The mobile localization guide covers the Android and iOS formats end to end.
Transglot's site states that plural handling comes from "224 CLDR plural languages". The count found for this guide is in "How this guide was checked".
Common mistakes
- Choosing the form with
count === 1. It is the English rule. Ask the runtime for the category. - Reading category names as numbers.
zeroin Latvian includes 10,onein Russian includes 21,twoin Slovenian includes 102. - Leaving the number out of
one. "One file" is wrong for 21 files in Russian. - Using
=1whereonewas meant, orzerowhere=0was meant. Exact values and categories are different selectors. - Giving the target the source's forms. The category list comes from the target language.
- Omitting
otherbecause integers never reach it. Decimals do, and parsers require it. - Forgetting
manyin French, Spanish, Italian and Portuguese. CLDR lists it for whole millions. - Treating gettext indexes as categories.
msgstr[2]ismanyin Russian andotherin Czech. - Selecting on a number that is displayed differently. "1.0" and "1" are different categories in English.
- Using cardinal rules for ordinals. English "21st" comes from the ordinal rule set.
- Concatenating around a plural. "You have " + plural + " left" fixes the word order for every language.
- Testing with 1 and 2 only. Russian needs 1, 2, 5, 11, 21 and a decimal at minimum.
- Assuming one CLDR version. Vietnamese has one category in CLDR 47 and two in CLDR 49.
Checklist
Frequently asked questions
What are plural rules?
Plural rules are the conditions that decide which grammatical form of a message goes with a given number in a given language. Unicode CLDR publishes them per language, and each rule maps a number to one of six categories: zero, one, two, few, many or other. Software uses them through APIs such as Intl.PluralRules in JavaScript or PluralRules in ICU.
What are the CLDR plural categories?
There are six names: zero, one, two, few, many and other. A language uses only the ones its grammar needs, and other is always present. The names are mnemonics: one in Russian covers 1, 21 and 101, and zero in Latvian covers 0 and 10 to 20.
How many plural forms does Arabic have?
Six. Arabic uses zero for 0, one for 1, two for 2, few for numbers ending in 03 to 10, many for numbers ending in 11 to 99, and other for the rest, such as 100, 101, 102 and decimals. The pattern repeats every hundred, so 103 is few and 111 is many.
What are the Russian plural rules?
Russian has four categories. one is for integers ending in 1 but not 11 (1, 21, 101). few is for integers ending in 2 to 4 but not 12 to 14. many is for integers ending in 0 or 5 to 9, and for 11 to 14. other is for decimals such as 1.5. Ukrainian and Belarusian use the same rule set.
What are the Polish plural rules?
Polish has the same four category names as Russian with one difference: one is only the number 1. So 21, 31 and 101 are many in Polish and one in Russian. few is integers ending in 2 to 4 except 12 to 14, many is the other integers, and other is decimals.
How do plurals work in ICU message format?
An ICU plural is written {count, plural, one {# file} other {# files}}. The library finds the CLDR category of count for the current locale and prints that branch, replacing # with the formatted number. Exact selectors such as =0 are checked before categories, other is required, and selectordinal does the same with ordinal rules.
What is the difference between `=0` and `zero`?
=0 is an exact match for the number 0 and works in every language. zero is a plural category, which only some languages have and which can include other numbers: in Latvian it covers 10, 20 and 30. For a "no items" message use =0.
Why does gettext use `msgstr[0]` instead of category names?
gettext predates the CLDR category names. Each PO file carries a Plural-Forms header with the number of forms and a C expression that turns n into an index, and the translator fills one msgstr[n] per index. The index has no fixed meaning across languages, so converting to a category-based format means evaluating that expression for each language.
How this guide was checked
- Categories and tables. Every category shown for a number was computed with
Intl.PluralRules(select,selectRange,resolvedOptions().pluralCategories) on Node.js 22.15.1, ICU 77.1, CLDR 47. None was written from memory. - Rule text. The rules for Polish, Russian, Arabic, the Romance
manyand the English ordinals were read fromplurals.xmlandordinals.xmlin the CLDRrelease-47tag and compared withrelease-49. Operand definitions, syntax, explicit 0 and 1 cases and plural ranges follow UTS 35 Part 3, revision 79 (CLDR 49). - Language counts. The cardinal
plurals.xmllists 222 locale codes in CLDR 47, 227 in CLDR 48 and 228 in CLDR 49. Those totals includeroot, legacy aliases such asiwandin, and the variantspt_PTandkok_Latn. CLDR 49 groups its 228 codes into 39 rule sets. Transglot's figure of 224 equals the CLDR 48 list withoutrootand the two variants. By the same method CLDR 47 has 220 and CLDR 49 has 225. - Scripts.
plural-check.mjsandplural-samples.mjswere run on Node 22.15.1 and the outputs shown are the real outputs. The checker used@formatjs/icu-messageformat-parser3.5.18 on six sample files written for this guide. - ICU messages. The ICU examples were parsed with the same parser and evaluated with a small test formatter. They were not run through ICU4J, ICU4C or
intl-messageformat. - Format samples. The gettext, Android, Apple, Flutter, i18next, Vue I18n, Rails, Laravel and Fluent samples follow each project's documentation. None was compiled or run on its platform. The String Catalog workflow is from Apple's page, and the catalog's JSON shape is not shown because it was not found on the Apple pages read. The PO entry syntax (
msgid_plural,msgstr[n]) follows the example on Transglot's gettext format page, because the gettext manual's page on plural entries did not load. - Not computed. Compact notation in
Intl.PluralRules, because Node 22.15.1 does not apply the option. The table cells marked "Not checked" were not verified in documentation. - Word forms. The Russian, Polish and Arabic example forms were written for this guide and were not reviewed by a native speaker. The Slovenian and Lithuanian forms are quoted from ICU and Android documentation.
- Transglot. Its behaviour is taken from its documentation, not from a test run for this guide. No other localization platform was tested or benchmarked.
Sources
- Unicode Technical Standard 35, Part 3: Language Plural Rules
- Unicode CLDR: Language Plural Rules chart
- Unicode CLDR: Plural rules
- CLDR data: plurals.xml, release 47
- CLDR data: plurals.xml, release 49
- CLDR data: ordinals.xml, release 49
- ICU User Guide: Formatting messages
- ICU4J API: PluralFormat
- ICU4J API: MessageFormat
- ICU4J API: PluralRules
- ICU4C API: PluralRules
- MDN: Intl.PluralRules
- MDN: Intl.PluralRules() constructor
- MDN: Intl.PluralRules.prototype.selectRange()
- MDN: Intl.PluralRules.prototype.resolvedOptions()
- MDN: Intl.ListFormat
- MDN: Intl.NumberFormat() constructor
- GNU gettext manual: Additional functions for plural forms
- Android: String resources, quantity strings
- Apple: Localizing strings that contain plurals
- Apple: Localizing and varying text with a string catalog
- Flutter: Internationalizing Flutter apps
- Dart intl package: Intl.plural
- i18next: Plurals
- Vue I18n: Pluralization
- Rails Guides: Internationalization API, pluralization
- Laravel 13.x: Localization, pluralization
- Project Fluent: Selectors
- FormatJS: ICU message syntax
- FormatJS: ICU MessageFormat parser
- Transglot: plural forms
- Transglot: file formats
- Transglot: gettext format
- Transglot: quality checks