Skabelon:Plural
{{{1}}} {{{2}}}er
Denne skabelon giver enten entals- eller flertalsformen af et ord afhængigt en talværdi.
Brug
Angiv en talværdi, entalsformen og flertalsformen. Hvis flertalsformen er udeladt, dannes den af entalsformen ved tilføje "er":
- {{plural|tal|entalsord}}
- {{plural|tal|entalsord|flertalsord}}
Normal placeres et almindeligt mellemrum mellem talværdien og den valgte form af ordet. Med parameteren nb=yes bruges i stedet et hårdt mellemrum ( ):
- {{plural|tal|entalsord|nb=yes}}
- {{plural|tal|entalsord|flertalsord|nb=yes}}
Talværdien skal være med med punktum som decimaltegn hvis det ikke er et heltal. Skabelonen bruger det magiske ord i MediaWiki plural til at afgøre hvad der er ental og flertal.
Eksempler
{{plural|0|ø}}returns "0 øer"{{plural|1|ø}}returns "1 ø"{{plural|2|ø}}returns "2 øer"{{plural|-1|ø}}returns "-1 ø"{{plural|-2|ø}}returns "-2 øer"{{plural|0.5|ø}}returns "0.5 øer"{{plural|0,5|ø}}returns "0,5 ø" (forkert decimaltegn){{plural|1.5|ø}}returns "1.5 øer"{{plural|1,5|ø}}returns "1,5 ø" (forkert decimaltegn){{plural|-0.5|ø}}returns "-0.5 øer"{{plural|-1.5|ø}}returns "-1.5 øer"
{{plural|0|abe|aber}}returns "0 aber"{{plural|1|abe|aber}}returns "1 abe"{{plural|2|abe|aber}}returns "2 aber"{{plural|-1|abe|aber}}returns "-1 abe"{{plural|-2|abe|aber}}returns "-2 aber"{{plural|0.5|abe|aber}}returns "0.5 aber"{{plural|1.5|abe|aber}}returns "1.5 aber"{{plural|-0.5|abe|aber}}returns "-0.5 aber"{{plural|-1.5|abe|aber}}returns "-1.5 aber"
TemplateData
Plural
Allows easy formatting of statements using plural.
| Parameter | Beskrivelse | Type | Status | |
|---|---|---|---|---|
| Antal | 1 | Antallet af noget: 0, 1, 2 osv. | Tal | påkrævet |
| entalsform | 2 | Teksten som bruges hvis der er en ting | Streng | påkrævet |
| flertalsform | 3 | Teksten som bruges hvis der er flere ting. Hvis flertalsformen er udeladt, dannes den ved at tilføje "er" til entalsformen. | Streng | valgfri |
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.









