Template:Pluralize from text/doc

Usage
For use in infoboxes. Takes a generic parameter (e.g, nickname) and a plural argument (e.g., nicknames) and returns a singular output (e.g., "Nickname") if the plural argument is not given and Template:Detect singular determines that the value of nickname is singular by examining the text. Otherwise produces plural output (e.g., "Nicknames")

If the wikilink is provided, the returned value will use that as a link, and the output will be the link's display text.

Options
There are four named arguments that control the pluralization:
 * no_comma By default, commas (or semi-colons) will cause the text string to be considered plural. Setting 1 turns this behavior off.
 * any_comma By default, commas (or semi-colons) that are adjacent to digits are singular. Setting 1 turns this behavior off.
 * no_and By default, "and" causes a string to be plural. Setting 1 turns this behavior off.
 * parse_links By default, wikilinks are considered to be unparseable (singular) objects. Setting 1 will allow the parser to read the contents of the wikilinks and determine whether that makes the string plural.

Examples
→

→

→

→

→

TemplateData
{	"params": { "1": {			"label": "Generic parameter", "description": "Value of the wikitext parameter with unknown plurality", "type": "content", "required": true, "example": "" },		"2": {			"label": "Plural argument", "description": "value of the wikitext parameter known to be plural", "type": "string", "example": "" },		"3": {			"label": "Singular output", "description": "Label for the parameter if the value is singular", "type": "string", "required": true, "example": "Language" },		"4": {			"label": "Plural output", "description": "Label for the parameter if the value is plural", "type": "string", "required": true, "example": "Languages" },		"5": {			"label": "Wikilink", "description": "Page to link to in the label", "type": "wiki-page-name", "example": "Language" }	},	"description": "Helper template to adjust infobox field labels based on whether value is plural or not", "paramOrder": [ "1",		"2",		"3",		"4",		"5"	] }