Dutch is simple wrt. pluralization: it has just 1 vs "not 1".
The main gimmick of this module is adding "en"
to the word unless your provided
Rules
dictionary says it should behave differently.
Create a Rules
dictionary and a helper function that provides that dictionary
to the fromInt
function.
Over the course of development, as you add more usages of the pluralize
function, add those words into your Rules
dictionary.
You can look at the examples/
folder for the intended usage.
pluralize : PluralRules.Rules -> Basics.Int -> String -> String
Pluralization function for French rules (adding "en"
in the general case).
Make your own helper function that gives pluralize
your rules, so that you
don't need to mention them every time!
(See the examples/
folder.)
myPluralize : Int -> String -> String
myPluralize n word =
PluralRules.Nl.pluralize rules n word
pluralizeFloat : PluralRules.Rules -> Basics.Float -> String -> String
A Float
variant of pluralize
.