Template:Pluralize from text
Aspetto
| This template is used on many pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
| This template uses Lua: |
{{Pluralize from text}} is used to detect if a text value is a plural list or not. Its intended usage is for infobox parameters, where the label might need to change from a singular version to a plural version.
For example, if an infobox uses a |nickname= parameter, the label might change from Nickname to Nicknames if the text value has more than one nickname.
The output of the template can be forced by including {{force singular}} or {{force plural}} in the generic parameter.
Usage
[muda l codesc]{{Pluralize from text|text|singular=singular output|likely=likely plural output|plural=plural output|link=wikilink}}{{Pluralize from text|text|plural argument|singular output|plural output|wikilink}}
Examples
[muda l codesc]{{Pluralize from text|Chicagoan|singular=singular|plural=plural}}{{Pluralize from text|761 and 345|singular=singular|plural=plural}}{{Pluralize from text|1=|2=761/345|singular=singular|plural=plural}}{{Pluralize from text|Chicagoan|singular=Demonym|plural=Demonyms|link=Demonym}}{{Pluralize from text|761 and 345|singular=Area Code|plural=Area Codes|link=Area code}}
Parameters
[muda l codesc]There are five named parameters that control the pluralization:
|no_comma=– By default, commas (or semicolons) will cause the text string to be considered plural. Setting|no_comma=1turns this behavior off.|any_comma=– By default, commas (or semicolons) that are adjacent to digits are singular. Setting|any_comma=1turns this behavior off.|no_and=– By default, "and" causes a string to be plural. Setting|no_and=1turns this behavior off.|parse_links=– By default, Wikilinks are considered to be unparseable (singular) objects. Setting|parse_links=1will allow the parser to read the contents of the Wikilinks and determine whether that makes the string plural.|parse_number=– Setting|parse_number=1will cause the first integer in the string to determine plurality.
Additional parameters:
|likely=– The template makes a decision whether a string is a "likely plural" or a full "plural". The|likely=argument will be the output if the template determines that the string is only "likely plural". If|likely=is not given, "likely plural" and "plural" are treated identically.|link=– If the Wikilink is provided, the returned value will use that as a link, and the output will be the link's display text.
TemplateData
[muda l codesc]Crea la tabella TemplateData!