Difference between revisions of "Template:Alternate Language"
From GeoGebra Manual
m (changed back to old revision) |
m (experimenting) |
||
Line 1: | Line 1: | ||
− | <div class="infobox-wrapper"><div class="infobox language">{{# | + | <div class="infobox-wrapper"><div class="infobox language">This page differs among variants of English: |
− | {{# | + | {{#ifeq:{{NAMESPACE}}|Manual| |
+ | {{#ifeq:{{PAGENAME}}|{{{US_version}}}|[[Category:US]]}} | ||
+ | {{#ifeq:{{PAGENAME}}|{{{UK_version}}}|[[Category:UK]]}} | ||
+ | {{#ifeq:{{PAGENAME}}|{{{Aus_version}}}|[[Category:Aus]]}}}} | ||
+ | |||
+ | * [[:{{NAMESPACE}}:{{{US_version}}} {{ucfirst:{{{page_type}}}}}|{{{US_version}}} {{ucfirst:{{{page_type}}}}}]] | ||
+ | * [[:{{NAMESPACE}}:{{{UK_version}}} {{ucfirst:{{{page_type}}}}}|{{{UK_version}}} {{ucfirst:{{{page_type}}}}}]] | ||
+ | * [[:{{NAMESPACE}}:{{{UK_version}}} {{ucfirst:{{{page_type}}}}}|{{{UK_version}}} {{ucfirst:{{{page_type}}}}}]] | ||
+ | </div></div> | ||
== Usage == | == Usage == | ||
====Indicate current region and include alternate text for other regions.==== | ====Indicate current region and include alternate text for other regions.==== | ||
'''Example''' (applied to US version of "Center Command"): | '''Example''' (applied to US version of "Center Command"): | ||
* <nowiki> | * <nowiki> | ||
− | {{Alternate Language | + | {{Alternate Language|page_type=Command|US_version=Center |
− | US_version=Center|UK_version=Centre|Aus_version=Centre}} | + | |UK_version=Centre|Aus_version=Centre}} |
</nowiki> | </nowiki> | ||
− | '''Parameters''' ( | + | '''Parameters''' (page_type, *_version): |
*region = {US, UK, Aus}: regional language of current page; template will exclude references to current region | *region = {US, UK, Aus}: regional language of current page; template will exclude references to current region | ||
*region = {non-US, non-UK, non-Aus}: regional language excluded from current page; template will only include references to excluded region | *region = {non-US, non-UK, non-Aus}: regional language excluded from current page; template will only include references to excluded region |
Revision as of 21:33, 23 May 2010
This page differs among variants of English:
- [[:Template:{{{US_version}}} {{{page_type}}}|{{{US_version}}} {{{page_type}}}]]
- [[:Template:{{{UK_version}}} {{{page_type}}}|{{{UK_version}}} {{{page_type}}}]]
- [[:Template:{{{UK_version}}} {{{page_type}}}|{{{UK_version}}} {{{page_type}}}]]
Usage
Indicate current region and include alternate text for other regions.
Example (applied to US version of "Center Command"):
- {{Alternate Language|page_type=Command|US_version=Center |UK_version=Centre|Aus_version=Centre}}
Parameters (page_type, *_version):
- region = {US, UK, Aus}: regional language of current page; template will exclude references to current region
- region = {non-US, non-UK, non-Aus}: regional language excluded from current page; template will only include references to excluded region
- page_type = {"Command", "Tool"}: suffix of PAGENAME
- US_version, etc = regional NAME of command or tool (NAME + page_type = PAGENAME)
Comments
{{NAMESPACE}} is used to adjust link in template to match current page (public vs official).