Inflection Helpers
Table of Contents
inflection
Visit the: code | unit tests
{inflect}
Returns either the singular
or plural
inflection of a word based on the given count
.
Params
count
Numbersingular
String: The singular formplural
String: The plural formincludeCount
Stringreturns
String
Example
{{inflect 0 "string" "strings"}}
{{inflect 1 "string" "strings"}}
{{inflect 1 "string" "strings" true}}
{{inflect 2 "string" "strings"}}
{{inflect 2 "string" "strings" true}}
{ordinalize}
Returns an ordinalized number as a string.
Params
val
String: The value to ordinalize.returns
String: The ordinalized number
Example
{{ordinalize 1}}
{{ordinalize 21}}
{{ordinalize 29}}
{{ordinalize 22}}