Difference between revisions of "Template:Alternate Language"
From GeoGebra Manual
m (corrected if syntax) |
m (null testing) |
||
Line 11: | Line 11: | ||
{{#ifeq:{{PAGENAME}}|{{{Aus_version}}} {{ucfirst:{{{page_type}}}}}|[[Category:Aus]]}}}} | {{#ifeq:{{PAGENAME}}|{{{Aus_version}}} {{ucfirst:{{{page_type}}}}}|[[Category:Aus]]}}}} | ||
− | {{#if:{{{US_version}}}|* [[:{{NAMESPACE}}:{{{US_version}}} {{ucfirst:{{{page_type}}}}}|{{{US_version}}} {{ucfirst:{{{page_type}}}}} (US)]]| }} | + | {{#if:{{{US_version|}}}|* [[:{{NAMESPACE}}:{{{US_version}}} {{ucfirst:{{{page_type}}}}}|{{{US_version}}} {{ucfirst:{{{page_type}}}}} (US)]]| }} |
− | {{#if:{{{UK_version}}}|* [[:{{NAMESPACE}}:{{{UK_version}}} {{ucfirst:{{{page_type}}}}}|{{{UK_version}}} {{ucfirst:{{{page_type}}}}} (UK)]]| }} | + | {{#if:{{{UK_version|}}}|* [[:{{NAMESPACE}}:{{{UK_version}}} {{ucfirst:{{{page_type}}}}}|{{{UK_version}}} {{ucfirst:{{{page_type}}}}} (UK)]]| }} |
− | {{#if:{{{Aus_version}}}|* [[:{{NAMESPACE}}:{{{Aus_version}}} {{ucfirst:{{{page_type}}}}}|{{{Aus_version}}} {{ucfirst:{{{page_type}}}}} (Aus)]]| }} | + | {{#if:{{{Aus_version|}}}|* [[:{{NAMESPACE}}:{{{Aus_version}}} {{ucfirst:{{{page_type}}}}}|{{{Aus_version}}} {{ucfirst:{{{page_type}}}}} (Aus)]]| }} |
− | {{#if:{{{non-US_version}}}|* [[:{{NAMESPACE}}:{{{non-US_version}}} {{ucfirst:{{{page_type}}}}}|{{{non-US_version}}} {{ucfirst:{{{page_type}}}}} (UK + Aus)]]| }} | + | {{#if:{{{non-US_version|}}}|* [[:{{NAMESPACE}}:{{{non-US_version}}} {{ucfirst:{{{page_type}}}}}|{{{non-US_version}}} {{ucfirst:{{{page_type}}}}} (UK + Aus)]]| }} |
− | {{#if:{{{non-UK_version}}}|* [[:{{NAMESPACE}}:{{{non-UK_version}}} {{ucfirst:{{{page_type}}}}}|{{{non-UK_version}}} {{ucfirst:{{{page_type}}}}} (US + Aus)]]| }} | + | {{#if:{{{non-UK_version|}}}|* [[:{{NAMESPACE}}:{{{non-UK_version}}} {{ucfirst:{{{page_type}}}}}|{{{non-UK_version}}} {{ucfirst:{{{page_type}}}}} (US + Aus)]]| }} |
− | {{#if:{{{non-Aus_version}}}|* [[:{{NAMESPACE}}:{{{non-Aus_version}}} {{ucfirst:{{{page_type}}}}}|{{{non-Aus_version}}} {{ucfirst:{{{page_type}}}}} (UK + US)]]| }} | + | {{#if:{{{non-Aus_version|}}}|* [[:{{NAMESPACE}}:{{{non-Aus_version}}} {{ucfirst:{{{page_type}}}}}|{{{non-Aus_version}}} {{ucfirst:{{{page_type}}}}} (UK + US)]]| }} |
</div></div><noinclude> | </div></div><noinclude> | ||
== Usage == | == Usage == |
Revision as of 23:01, 27 May 2010
This page differs among variants of English:
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).