martinandert / counterpart

A translation and localization library for Node.js and the browser.
MIT License
242 stars 25 forks source link

Add support for more plural forms #50

Open waclaw66 opened 3 years ago

waclaw66 commented 3 years ago

Please add support for more plural forms like "few" or "many". https://unicode-org.github.io/cldr-staging/charts/38.1/supplemental/language_plural_rules.html

t3chguy commented 3 years ago

I think the difficulty with this is the rules are very different per-language.

few for Czech is 2~4 few for Polish is 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, … (integer ending in 2~4)

waclaw66 commented 3 years ago

I think this is already solved by language plugins within https://github.com/martinandert/pluralizers

I think the difficulty with this is the rules are very different per-language.

few for Czech is 2~4 few for Polish is 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, … (integer ending in 2~4)