Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Detect singular/doc: Difference between revisions

From Poets.Wiki
Created page with "{{wikipedia|page name}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> {{high use}} {{Lua|Module:Arguments|Module:Yesno|Module:Text}} 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|Wynken, Blynken, and Nod||singular|plural}}</nowiki></code>..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{wikipedia|page name}}
{{wikipedia|page name}}
<!-- 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 -->
{{high use}}
{{Lua|Module:Arguments|Module:Yesno|Module:Text}}
{{Lua|Module:Arguments|Module:Yesno|Module:Text}}


Line 9: Line 8:


*See [[Template:Detect singular]] for main() usage. Test cases [[Template:Detect singular/testcases|here]].
*See [[Template:Detect singular]] for main() usage. Test cases [[Template:Detect singular/testcases|here]].
*See [[Template:Pluralize from text]] for pluralize() usage (a wrapper around main()). Test cases [[Template:Pluralize from text/testcases|here]].
*See[Template:Pluralize from text for pluralize() usage (a wrapper around main()). Test cases here.


<includeonly>{{Sandbox other||
<includeonly>{{Sandbox other||

Latest revision as of 05:49, 14 April 2025

This page uses Creative Commons Licensed content from Wikipedia (view authors).

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|Wynken, Blynken, 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.