Module:Detect singular/doc: Difference between revisions
Appearance
Content deleted Content added
short doc with pointers |
expand, +cat |
||
Line 1: | Line 1: | ||
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> |
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> |
||
Lua to determine whether a string is singular or plural. Designed for use in infoboxes, to determine whether labels should be singular or plural based on the corresponding data, e.g. |
|||
⚫ | |||
⚫ | |||
<code><nowiki>{{#invoke:Detect singular|pluralize|Winken, Blinken, and Nod||singular|plural}}</nowiki></code> → {{#invoke:Detect singular|pluralize|Winken, Blinken, and Nod||singular|plural}} |
|||
⚫ | |||
⚫ | |||
<includeonly>{{Sandbox other|| |
<includeonly>{{Sandbox other|| |
||
<!-- Categories below this line; interwikis at Wikidata --> |
<!-- Categories below this line; interwikis at Wikidata --> |
||
[[Category:Infobox modules]] |
|||
}}</includeonly> |
}}</includeonly> |
Revision as of 05:40, 9 January 2022
Lua to determine whether a string is singular or plural. Designed for use in infoboxes, to determine whether labels should be singular or plural based on the corresponding data, e.g.
{{#invoke:Detect singular|pluralize|Winken, Blinken, and Nod||singular|plural}}
→ plural
- See Template:Detect singular for main() usage. Test cases here.
- See Template:Pluralize from text for pluralize() usage (a wrapper around main()). Test cases here.