HUGO
Menu
GitHub 90206 stars Mastodon

inflect.Pluralize

Returns the plural form of the given word according to a set of common English pluralization rules.
Syntax
inflect.Pluralize INPUT
Returns
string
Alias
pluralize

Usage

The inflect.Pluralize function returns the plural form of the given word according to a set of common English pluralization rules. If the word is already plural, the function returns it unchanged.

Examples

{{ inflect.Pluralize "cat" }} → cats
{{ inflect.Pluralize "box" }} → boxes
{{ inflect.Pluralize "category" }} → categories

Converting irregular nouns:

{{ inflect.Pluralize "child" }} → children
{{ inflect.Pluralize "person" }} → people
{{ inflect.Pluralize "sheep" }} → sheep