Closed mateesville93 closed 3 months ago
Currently Pagefind switches between the zero_results
/ many_results
/ one_result
translation strings for 0 / 1 / 2+ results.
This won't handle languages with other forms of pluralization, e.g. few
vs many
— if you have specific rules that would help you here we could add something like a few_results
string that can handle a specific number range — let me know what you need :)
Will be nice to have something like this: zero_results
/ one_results
/ two_results
/ few_results
/ other_results
Here is a reference for ranges:
https://www.unicode.org/cldr/charts/44/supplemental/language_plural_rules.html#ro
Accordingly to Unicode.org: "Languages vary in how they handle plurals of nouns or unit expressions ("hours", "meters", and so on). Some languages have two forms, like English; some languages have only a single form; and some languages have multiple forms (see Slovenian below)."
Someone to merge this PR?
Hey @mateesville93 , sorry for the delay! Merging now, and I'll ping you again when the next release lands.
Released in released in v1.1.0, thanks again!
Do you have in plan to support Pluralization like Hugo?(Some languages need this): Example for reading time of a post below: English: [reading_time] one = "One minute to read" other = "{{ .Count }} minutes to read"
Romanian: [reading_time] one = "Un minut de citit" few = "{{ .Count }} minute de citit" other = "{{ .Count }} de minute de citit"