Difference between revisions of "Template:Alternate Language"
From GeoGebra Manual
m (added wrapper) |
m |
||
Line 1: | Line 1: | ||
− | <div class=" | + | <div class="alternate-language">{{#switch: {{{region}}} | US | non-UK | non-Aus = {{#ifeq:{{NAMESPACE}}|Manual|[[Category:US]]}}| <span class="alternative-us">This {{lcfirst:{{{page_type}}}}} is different in US English. See [[:{{NAMESPACE}}:{{{US_version}}} {{ucfirst:{{{page_type}}}}}|{{{US_version}}} {{ucfirst:{{{page_type}}}}}]].</span><br /> }} |
− | {{#switch: {{{region}}} | UK | non-US | non-Aus = {{#ifeq:{{NAMESPACE}}|Manual|[[Category:UK]]}}| This {{lcfirst:{{{page_type}}}}} is different in UK English. See [[:{{NAMESPACE}}:{{{UK_version}}} {{ucfirst:{{{page_type}}}}}|{{{UK_version}}} {{ucfirst:{{{page_type}}}}}]].<br /> }}{{#switch: {{{region}}} | Aus | non-US | non-UK = {{#ifeq:{{NAMESPACE}}|Manual|[[Category:Aus]]}}| This {{lcfirst:{{{page_type}}}}} is different in Australian English. See [[:{{NAMESPACE}}:{{{Aus_version}}} {{ucfirst:{{{page_type}}}}}|{{{Aus_version}}} {{ucfirst:{{{page_type}}}}}]]. | + | {{#switch: {{{region}}} | UK | non-US | non-Aus = {{#ifeq:{{NAMESPACE}}|Manual|[[Category:UK]]}}| <span class="alternative-uk">This {{lcfirst:{{{page_type}}}}} is different in UK English. See [[:{{NAMESPACE}}:{{{UK_version}}} {{ucfirst:{{{page_type}}}}}|{{{UK_version}}} {{ucfirst:{{{page_type}}}}}]].</span><br /> }}{{#switch: {{{region}}} | Aus | non-US | non-UK = {{#ifeq:{{NAMESPACE}}|Manual|[[Category:Aus]]}}| <span class="alternative-aus">This {{lcfirst:{{{page_type}}}}} is different in Australian English. See [[:{{NAMESPACE}}:{{{Aus_version}}} {{ucfirst:{{{page_type}}}}}|{{{Aus_version}}} {{ucfirst:{{{page_type}}}}}]].</span>}}</div><noinclude> |
== Usage == | == Usage == | ||
====Indicate current region and include alternate text for other regions.==== | ====Indicate current region and include alternate text for other regions.==== |
Revision as of 12:50, 23 May 2010
Usage
Indicate current region and include alternate text for other regions.
Example (applied to US version of "Center Command"):
- {{Alternate Language|region=US|page_type=Command| US_version=Center|UK_version=Centre|Aus_version=Centre}}
Parameters (region, 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).