Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  



1.1  Options  







2 Examples  





3 TemplateData  














Template:Pluralize from text






Авар
تۆرکجه

Bosanski
Буряад
Cebuano
ChiTumbuka
فارسی


ि
Ilokano
Bahasa Indonesia

Ikinyarwanda
ि

Mfantse
Монгол

ି
Oʻzbekcha / ўзбекча

Papiamentu
Shqip

Simple English
کوردی
Srpskohrvatski / српскохрватски
Tagalog
ி
Українська
اردو
Tiếng Vit
 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


Usage

{{Pluralize from text|generic parameter|singular=singular output|likely=likely plural output|plural=plural output|link=wikilink}}
{{Pluralize from text|generic parameter|plural argument|singular output|plural output|wikilink}}

For use in infoboxes. Takes a generic parameter (e.g, |nickname=) and a plural argument (e.g., |nicknames=) and returns a singular output (e.g., "Nickname") if the plural argument is not given and Template:Detect singular determines that the value of |nickname= is singular by examining the text. Otherwise produces plural output (e.g., "Nicknames")

If the wikilink is provided, the returned value will use that as a link, and the output will be the link's display text.

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.

The output of the template can be forced by including {{force singular}}or{{force plural}} in the generic parameter.

Options

There are four named arguments that control the pluralization:

Examples

{{Pluralize from text|Chicagoan|singular=singular|plural=plural}} → singular

{{Pluralize from text|761 and 345|singular=singular|plural=plural}} → plural

{{Pluralize from text||761/345|singular=singular|plural=plural}} → plural

{{Pluralize from text|Chicagoan|singular=Demonym|plural=Demonyms|link=Demonym}}Demonym

{{Pluralize from text|761 and 345|singular=Area Code|plural=Area Codes|link=Area code}}Area Codes

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Pluralize from text in articles based on its TemplateData.

TemplateData for Pluralize from text

Helper template to adjust infobox field labels based on whether value is plural or not
Generic parameter1

Value of the wikitext parameter with unknown plurality

Example
{{{language|}}}
Plural argument2

value of the wikitext parameter known to be plural

Example
{{{languages|}}}
Singular output3
singular

Label for the parameter if the value is singular

Example
Language
Plural output4
plural

Label for the parameter if the value is plural

Example
Languages
Wikilink5
link

Page to link to in the label

Example
Language
Turn off comma processingno_comma

By default, commas and semicolons indicate plurals. Setting to yes turns this off.

Default
No

Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Pluralize_from_text&oldid=1064683755"

Category: 
Lua-based templates
Hidden categories: 
Wikipedia template-protected templates
Templates using TemplateData
 



This page was last edited on 9 January 2022, at 17:59 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki