Question · JavaScript and React course · Module 10: React Ecosystem and Future
Pluralization in i18n
How does react-i18next handle pluralization (e.g., '1 item' vs '5 items')?
Answer options
- Requires manually writing if/else for each language in components
- Always displays the plural form regardless of the value
- Does not support pluralization - a separate library is required
- Uses keys with suffixes (_one, _few, _many, _other) in translation files, automatically selecting the appropriate form
You can check the correct answer by solving this task in the CodeWorlds game.