Difference between revisions of "Module:Country alias/doc"
blackwiki>Johnuniq (add links for /data) |
blackwiki>Primefac (update /doc) |
||
| Line 2: | Line 2: | ||
{{high-risk|40847}} | {{high-risk|40847}} | ||
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | ||
| − | This module implements {{t|country alias}}. Check there for usage documentation. | + | This module implements {{t|country alias}} and the {{t|flagIOC2}} family of templates. Check there for usage documentation. |
{{#invoke:convert/tester|compare|Country alias|Country alias/data}} | {{#invoke:convert/tester|compare|Country alias|Country alias/data}} | ||
== Usage == | == Usage == | ||
| + | ===Template:Country alias=== | ||
This module is used by {{t|country alias}} to return either the country name or the country's flag, based on a combination of the three-letter country code (required), the year (optional), and the competition being played (optional). | This module is used by {{t|country alias}} to return either the country name or the country's flag, based on a combination of the three-letter country code (required), the year (optional), and the competition being played (optional). | ||
<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|main|''alias=''|''flag=''|''games=''|''year=''}}</code> | <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|main|''alias=''|''flag=''|''games=''|''year=''}}</code> | ||
| + | |||
| + | ===Template:FlagIOC=== | ||
| + | This module is used by {{t|flagIOC}} to return a formatted country flag, country name, and the number of athletes present (optional) at a given edition of the [[Olympic Games]]. | ||
| + | |||
| + | <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|flagIOC|''alias=''|''flag=''|''games=''|''year=''|''athletes=''}}</code> | ||
| + | |||
| + | ===Template:FlagIOC2 and variants=== | ||
| + | This module is used by the {{t|flagIOC2}} [[Template:Flag templates|family of templates]] (except flagIOC, described above) to return various formatted combinations of country flag, country name, the number of athletes present and/or names of athletes present at a given Games. | ||
| + | |||
| + | <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|flagXYZ|''alias=''|''flag=''|''games=''|''year=''|''athletes=''|''type=''}}</code> | ||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | ||
Revision as of 13:51, 9 July 2020
| This module is rated as ready for general use. It has reached a mature form and is thought to be bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by sandbox testing rather than repeated trial-and-error editing. |
| This Lua module is used on approximately 45,000 pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages. Consider discussing changes on the talk page before implementing them.
Transclusion count updated automatically (see documentation). |
This module implements Template:T and the Template:T family of templates. Check there for usage documentation.
- Module:Country alias • Module:Country alias/sandbox • different (diff)
- Module:Country alias/data • Module:Country alias/data/sandbox • different (diff)
Usage
Template:Country alias
This module is used by Template:T to return either the country name or the country's flag, based on a combination of the three-letter country code (required), the year (optional), and the competition being played (optional).
{{#invoke:Country alias|main|alias=|flag=|games=|year=}}
Template:FlagIOC
This module is used by Template:T to return a formatted country flag, country name, and the number of athletes present (optional) at a given edition of the Olympic Games.
{{#invoke:Country alias|flagIOC|alias=|flag=|games=|year=|athletes=}}
Template:FlagIOC2 and variants
This module is used by the Template:T family of templates (except flagIOC, described above) to return various formatted combinations of country flag, country name, the number of athletes present and/or names of athletes present at a given Games.
{{#invoke:Country alias|flagXYZ|alias=|flag=|games=|year=|athletes=|type=}}