Multiple plural parameters
If Text contains multiple pluralized parameters, different permutations can be supplied.
# Configuration
TemplateFormat: BraceNumeric
PluralRules: Unicode.CLDR41
English:
- Culture: en
Items:
- Key: Namespace.CatsDogs
Cases:
- Text: "a cat and a dog"
Plurals: "0:cardinal:one,1:cardinal:one"
- Text: "{0} cats and a dog"
Plurals: "0:cardinal:other,1:cardinal:one"
- Text: "a cat and {1} dogs"
Plurals: "0:cardinal:one,1:cardinal:other"
- Text: "{0} cats and {1} dogs"
Plurals: "0:cardinal:other,1:cardinal:other"
Optional cases can also be provided, though the number of case permutations may explode. [Demo]
# Configuration
TemplateFormat: BraceNumeric
PluralRules: Unicode.CLDR41
English:
- Culture: en
Items:
- Key: Namespace.CatsDogs
Cases:
- Text: "no cats and no dogs"
Plurals: "0:cardinal:zero,1:cardinal:zero"
- Text: "a cat but no dogs"
Plurals: "0:cardinal:one,1:cardinal:zero"
- Text: "{0} cats but no dogs"
Plurals: "0:cardinal:other,1:cardinal:zero"
- Text: "no cats but a dog"
Plurals: "0:cardinal:zero,1:cardinal:one"
- Text: "a cat and a dog"
Plurals: "0:cardinal:one,1:cardinal:one"
- Text: "{0} cats and a dog"
Plurals: "0:cardinal:other,1:cardinal:one"
- Text: "no cats but {1} dogs"
Plurals: "0:cardinal:zero,1:cardinal:other"
- Text: "a cat and {1} dogs"
Plurals: "0:cardinal:one,1:cardinal:other"
- Text: "{0} cats and {1} dogs"
Plurals: "0:cardinal:other,1:cardinal:other"
If pluralized cases are not provided, Text should be formulated so that it accommodates all possible values.
# Configuration
TemplateFormat: BraceNumeric
PluralRules: Unicode.CLDR41
English:
- Culture: en
Items:
- Key: Namespace.CatsDogs
Text: "{0} cat(s) and {1} dog(s)"
It is possible to supply only some permutations.
# Configuration
TemplateFormat: BraceNumeric
PluralRules: Unicode.CLDR41
English:
- Culture: en
Items:
- Key: Namespace.CatsDogs
Text: "{0} cat(s) and {1} dog(s)"
Cases:
- Text: "a cat and a dog"
Plurals: "0:cardinal:one,1:cardinal:one"
Tip
Multiple parameters can also be handled with emplacements in the code.