JavaScript · Senior · Question 72 of 75
Why use Intl.PluralRules for messages like "5 files"?
- ✓Correct answer: Languages have different plural categories (Ukrainian and Polish have more than two), and it picks the right one
- 2It translates the word automatically
- 3It formats numbers with separators
Explanation
new Intl.PluralRules("uk").select(5) returns "many", while English only distinguishes one/other. i18n libraries build on it.