Änderungen

Wechseln zu: Navigation, Suche

Vorlage:Plural/doc

1.480 Bytes hinzugefügt, 00:18, 4. Feb. 2017
Die Seite wurde neu angelegt: „{{documentation subpage}} This template allows easy formatting of statements of the form "# thing(s)", with correct use of plurals. It uses the Help:Magic w…“
{{documentation subpage}}

This template allows easy formatting of statements of the form "# thing(s)", with correct use of plurals. It uses the [[Help:Magic words#Language-dependent word conversions|"plural" magic word]], so ideally it should work with minimal modification for other language.

===Syntax===
* <nowiki>{{</nowiki>plural|''number''|''name''}}
* <nowiki>{{</nowiki>plural|''number''|''singular name''|''plural name''}}

===Examples===
For most English nouns, the plural is formed by adding "s" to the end of the singular form. If that is the case, only one "name" parameter is required:
* <code><nowiki>{{plural|0|page}}</nowiki></code> returns "{{plural|0|page}}"
* <code><nowiki>{{plural|1|page}}</nowiki></code> returns "{{plural|1|page}}"
* <code><nowiki>{{plural|2|page}}</nowiki></code> returns "{{plural|2|page}}"

For plurals that require adding "es", or more unusual forms, the singular and plural forms must be specified explicitly:
* <code><nowiki>{{plural|0|ox|oxen}}</nowiki></code> returns "{{plural|0|ox|oxen}}"
* <code><nowiki>{{plural|1|ox|oxen}}</nowiki></code> returns "{{plural|1|ox|oxen}}"
* <code><nowiki>{{plural|2|ox|oxen}}</nowiki></code> returns "{{plural|2|ox|oxen}}"

===Notes===
* While <code><nowiki>{{plural|#|sheep|sheep}}</nowiki></code> is valid, it is also fairly pointless.

<includeonly>
<!-- ADD CATEGORIES BELOW THIS LINE -->
[[Category:Mathematical function templates]]

<!-- ADD INTERWIKIS BELOW THIS LINE -->
</includeonly>
688
Bearbeitungen

Navigationsmenü