Difference between revisions of "Template:Getalias/doc"
Jump to navigation
Jump to search
imported>DixonDBot m (Migrating 3 interwiki links, now provided by Wikidata on d:Q8141172) |
imported>SiBr4 m (Better shortname example (alias in China template is now same as shortname alias)) |
||
| Line 5: | Line 5: | ||
This is a meta-template that is not intended to be transcluded directly from the main article space. It can be used to construct other templates that need to extract the <tt>alias</tt> value from the specified <tt>[[:Category:Country data templates|country_data]]</tt> structure, so that customized wikilinks can be constructed. For example, <tt><nowiki>{{getalias|USA}}</nowiki></tt> → "{{getalias|USA}}". | This is a meta-template that is not intended to be transcluded directly from the main article space. It can be used to construct other templates that need to extract the <tt>alias</tt> value from the specified <tt>[[:Category:Country data templates|country_data]]</tt> structure, so that customized wikilinks can be constructed. For example, <tt><nowiki>{{getalias|USA}}</nowiki></tt> → "{{getalias|USA}}". | ||
| − | Use <tt>shortname</tt> as a second parameter to retrieve the <tt>shortname alias</tt> value if desired. For example, <tt><nowiki>{{getalias| | + | Use <tt>shortname</tt> as a second parameter to retrieve the <tt>shortname alias</tt> value if desired. For example, <tt><nowiki>{{getalias|IRL}}</nowiki></tt> → "{{getalias|IRL}}", but <tt><nowiki>{{getalias|IRL|shortname}}</nowiki></tt> → "{{getalias|IRL|shortname}}". |
A third parameter can specify the variant, for example <nowiki>[[Image:{{getalias|USA|flag|1912}}|22px]]</nowiki> -> [[Image:{{getalias|USA|flag|1912}}|22px]] }} | A third parameter can specify the variant, for example <nowiki>[[Image:{{getalias|USA|flag|1912}}|22px]]</nowiki> -> [[Image:{{getalias|USA|flag|1912}}|22px]] }} | ||
Revision as of 20:53, 25 August 2013
| 40px | This is a documentation subpage for Template:Getalias. It contains usage information, categories and other content that is not part of the original template page. |
Usage
This is a meta-template that is not intended to be transcluded directly from the main article space. It can be used to construct other templates that need to extract the alias value from the specified country_data structure, so that customized wikilinks can be constructed. For example, {{getalias|USA}} → "United States".
Use shortname as a second parameter to retrieve the shortname alias value if desired. For example, {{getalias|IRL}} → "Republic of Ireland", but {{getalias|IRL|shortname}} → "Ireland".
A third parameter can specify the variant, for example [[Image:{{getalias|USA|flag|1912}}|22px]] -> File:Flag of the United States (1912-1959).svg }}
See also
- {{ISO 3166 name}}