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
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><onlyinclude>{{#switch:{{{1}}}
<includeonly><onlyinclude>{{#switch:{{{1}}}
|City=Cities
|City=Cities
|Ministry=Ministries
|Air Travel Agency=Air Travel Agencies
|Embassy=Embassies
|#default={{{1}}}s
|#default={{{1}}}s
}}</onlyinclude></includeonly>
}}</onlyinclude></includeonly>
Line 8: Line 11:
<pre>Category:{{Plural|City}}</pre>
<pre>Category:{{Plural|City}}</pre>
Category:{{Plural|City}}
Category:{{Plural|City}}
<pre>Category:{{Plural|NPC}}</pre>
Category:{{Plural|NPC}}

Latest revision as of 23:48, 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