Template:Plural: Difference between revisions

From HorizonXI Wiki
(Created page with "<includeonly><onlyinclude>{{#switch:{{{1}}} |City=Cities |#default={{{1}}}s }}</onlyinclude></includeonly> ==Usage== Template that returns the plural of a given term. The use is intended for other Templates when the input is a parameter so the plural cannot be known in advance. Programmatically, plurals are often used to connect a label on a page to a category (NPC -> Category:NPCs). Most work with an added 's' but there are some irregular plurals. Those can be tracked h...")
 
mNo edit summary
Line 8: Line 8:
<pre>Category:{{Plural|City}}</pre>
<pre>Category:{{Plural|City}}</pre>
Category:{{Plural|City}}
Category:{{Plural|City}}
<pre>Category:{{Plural|NPC}}</pre>
Category:{{Plural|NPC}}

Revision as of 23:35, 29 August 2024

Usage

Template that returns the plural of a given term. The use is intended for other Templates when the input is a parameter so the plural cannot be known in advance. Programmatically, plurals are often used to connect a label on a page to a category (NPC -> Category:NPCs). Most work with an added 's' but there are some irregular plurals. Those can be tracked here so that any templates which are supposed to use plurals in this way can do so safely via the Plural template.

Examples

Category:{{Plural|City}}

Category:Cities

Category:{{Plural|NPC}}

Category:NPCs