Template:AppealAmountSwitch: Difference between revisions

Content deleted Content added
Jsoby (talk | contribs)
mNo edit summary
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1:
{{#ifeq:{{{amount|}}}|all|<span class="consider-amounts">}}{{#ifexist:Template:AppealAmountSwitch/{{{language}}}|{{AppealAmountSwitch/{{{language}}}|{{{country}}}|{{{1}}}|amount={{{amount}}}}}|{{{1}}}}}{{#ifeq:{{{amount|}}}|all|</span>}}<noinclude>
{{#switch:{{{language}}}
== Documentation ==
| en = {{#switch:{{{country}}}
This template checks if there is a subtemplate of this one for a given <tt>language</tt>. If there is, it uses parameters from that template to insert the right amounts into the appeal for the right <tt>country</tt>.
| US = $5, $10, $20
 
| GB = £5, £10, £15
Use:
| #default = {{{1}}}
:<tt><nowiki>{{AppealAmountSwitch|</nowiki>language=<langcode>|country=<nowiki>{{{country}}}</nowiki>|amount=<amount>|<fallback><nowiki>}}</nowiki></tt>
}}
 
| #default = {{{1|$5, €10, ¥1000}}}
Parameters:
}}
;<tt>language</tt>
:The language code of the appeal.
;<tt>country</tt>
:Should always be <nowiki>{{{country}}}</nowiki>.
;<tt>amount</tt>
:Either <tt>$5</tt>, <tt>$10</tt> or <tt>all</tt>.
;<tt><nowiki>{{{1}}}</nowiki></tt>
:The fallback if the language subtemplate doesn't exist '''or''' it does, but there is no localization for the given country.
 
== List of subtemplates ==
{{Special:Prefixindex/Template:AppealAmountSwitch/}}
</noinclude>