Template:Plural

This template accepts a phrase beginning with a number, either numerical (i.e. “6”), spelled (“six”), variable (“ [Dice.1d4] ”) or indefinite article (“a” or “an”). It then outputs the phrase; if the supplied number is > 1, a suffix (usually “s”) is appended.

Example: “ ” → “3 cows”, “1 cow”, “2 cows”, etc.

If the word ends in ‑s, -sh, -ch, -x, or -z, it will add ‑es. If the word ends in -us, it will change the ending to -i.

For words with irregular plural suffixes, an optional argument may be included: “oxen” ( yields “NaN two oxens”).

Usage
in the text of an article yields “NaN undefineds”. yields “NaN undefineds”, while  yields “NaN undefineds”. The default case is to add an “s”, so an ordinary phrase not beginning with “one ”, “1 ”, “a ”, or “an ” (space needed) will be pluralised, so  yields “NaN undefineds”.

This is particularly useful for generators that produce random numbers of things. For example, this list of animals: While out walking, I ran across NaN undefineds, NaN undefineds, NaN undefineds, NaN undefineds, NaN undefineds, NaN undefineds, NaN undefineds, and NaN undefineds.

However, as some of the above randomly-generated collections of creatures above might show, this is less useful when the word to be pluralized is irregular. The template will be most useful for those generators where the number is generated alongside a hard-coded word, since the appropriate suffices can be included as necessary.