Building Your Learning Module...
Getting things ready for you!
Find videos you like?
Save to resource drawer for future reference!
Different languages have different plural forms. English has singular/plural, but Polish has 3 forms, and Arabic has 6! PluralRules tells you which form to use for any number.
new Intl.PluralRules(locale, options)pluralRules.select(number)Language code for plural rules
"en-US" - English (2 forms)"pl-PL" - Polish (3 forms)"ar-SA" - Arabic (6 forms)Configure plural type
type - "cardinal" or "ordinal"minimumFractionDigitsmaximumFractionDigitszero - 0 itemsone - 1 itemtwo - 2 items (rare)few - few itemsmany - many itemsother - other amountsone - 1st, 21st, 31sttwo - 2nd, 22nd, 32ndfew - 3rd, 23rd, 33rdother - 4th, 5th, 6th....select(n) returns category stringGet the plural category for a number
Languages have different plural rules
Format ordinal numbers (1st, 2nd, 3rd)
Build a multi-language shopping cart message
See which plural categories a locale supports
Build a simple i18n system with plural support
Get correct form: zero, one, two, few, many, other
Each language has different plural rules (2-6 forms)
cardinal (1, 2, 3) or ordinal (1st, 2nd, 3rd)
Essential for building multi-language applications