-
-
Notifications
You must be signed in to change notification settings - Fork 186
Description
Describe the bug
For languages such as Czech, Irish, Russian, or Welsh, the current I18n::translateCount() and tt() functions are not helpful. The current functions assume there can be only 3 forms of numbers (for 0, 1, and everything else).
For a language like Irish, there can be 5 distinct forms:
- when the value is
1 - when the value is
2 - when the value is
3,4,5, or6 - when the value is
7,8,9, or10 - when the value is anything else, such as
0,11,24
Unicode has a published table documenting nearly every language's rules: https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html
Mozilla has a more approachable document for this: https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals
I suspect ngettext would be helpful to use in this scenario.
Kirby Version
3.3.3