Difference between revisions of "Template:Alternate Language"

From GeoGebra Manual
Jump to: navigation, search
m (changed back to old revision)
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="infobox-wrapper"><div class="infobox language">{{#switch: {{{region}}} | US | non-UK | non-Aus = {{#ifeq:{{NAMESPACE}}|Manual|[[Category:US]]}}| This {{lcfirst:{{{page_type}}}}} is different in US English.  See [[:{{NAMESPACE}}:{{{US_version}}} {{ucfirst:{{{page_type}}}}}|{{{US_version}}} {{ucfirst:{{{page_type}}}}}]].<br /> }}
+
{{mbox|text=This command differs among variants of English: <!--
{{#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}}}}}]]. }}</div></div><noinclude>
+
-->{{#if:{{{US_version|}}}|* {{{US_version}}} (US)|&nbsp;}}<!--
== Usage ==
+
-->{{#if:{{{UK_version|}}}|* {{{UK_version}}} (UK)|&nbsp;}}<!--
====Indicate current region and include alternate text for other regions.====
+
-->{{#if:{{{Aus_version|}}}|* {{{Aus_version}}} (Aus)|&nbsp;}}<!--
'''Example''' (applied to US version of "Center Command"):
+
-->{{#if:{{{non-US_version|}}}|* {{{non-US_version}}} (UK + Aus)|&nbsp;}}<!--
* <nowiki>
+
-->{{#if:{{{non-UK_version|}}}|* {{{non-UK_version}}} (US + Aus)|&nbsp;}}<!--
{{Alternate Language|region=US|page_type=Command|
+
-->{{#if:{{{non-Aus_version|}}}|* {{{non-Aus_version}}} (UK + US)|&nbsp;}}|
US_version=Center|UK_version=Centre|Aus_version=Centre}}
+
image=[[Image:Globe.png|64px|link=]]}}
</nowiki>
+
<noinclude>{{documentation}}</noinclude><noinclude>[[Category:Exclude in print]]</noinclude>
'''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==
 
<nowiki>{{NAMESPACE}}</nowiki> is used to adjust link in template to match current page (public vs official).
 
</noinclude><noinclude>[[Category:Exclude in print]]</noinclude>
 

Latest revision as of 11:26, 4 August 2015

[edit] [purge] Template documentation

Indicate current region and include alternate text for other regions.

Usage

{{Alternate Language|page_type=Command|US_version=Center|non-US_version=Centre}} produces


Example

(applied to US version of "Center Command"): 
  • {{Alternate Language|US_version=Center|non-US_version=Centre}}
  • {{Alternate Language|US_version=Center|UK_version=Centre|Aus_version=Centre}}

Parameters (page_type, *_version):

  • US_version, etc = regional name of command

Comments

{{NAMESPACE}} is used to adjust link in template to match current page (public vs official).

© 2024 International GeoGebra Institute