Template:Text: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(removing test)
(updating documentation with new templates and adding parameters pre and post)
Line 1: Line 1:
{{switch|{{{1}}}
{{switch|{{{1}}}
|case: 2=<b><big>{{flag|{{{2}}}|show}} and {{flag|{{{3}}}|show}}  text</big></b><br><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:{{{2}}} texts]][[Category:{{{3}}} texts]][[Category:Macaronic texts|2 {{PAGENAME}}]]}}</includeonly>
|case: 2=<b><big>{{flag|{{{2}}}|show}} and {{flag|{{{3}}}|show}}  text</big></b><br><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{2}}} texts]][[Category:{{{3}}} texts]][[Category:Macaronic texts|2 {{PAGENAME}}]]}}</includeonly>
|case: 3=<b><big>{{flag|{{{2}}}|show}}, {{flag|{{{3}}}|show}} and {{flag|{{{4}}}|show}} text</big></b><br><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:{{{2}}} texts]][[Category:{{{3}}} texts]][[Category:{{{4}}} texts]][[Category:Macaronic texts|3 {{PAGENAME}}]]}}</includeonly>
|case: 3=<b><big>{{flag|{{{2}}}|show}}, {{flag|{{{3}}}|show}} and {{flag|{{{4}}}|show}} text</big></b><br><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{2}}} texts]][[Category:{{{3}}} texts]][[Category:{{{4}}} texts]][[Category:Macaronic texts|3 {{PAGENAME}}]]}}</includeonly>
|default=<b><big>{{flag|{{{1}}}}} {{{2|}}} {{{1}}} {{{3|}}} text</big></b><br><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:{{{1}}} texts]]}}</includeonly>
|default=<b><big>{{flag|{{{1}}}}} {{{pre|}}} {{{1}}} {{{post|}}} text</big></b><br><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{1}}} texts]]}}</includeonly>
}}<includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]]}}</includeonly><noinclude>
}}<noinclude>
{{prot-temp}}<br>
{{prot-temp}}<br>
<div style="margin: 0; margin-right: 30px; margin-left: 30px; border: 1px solid #3399ff; padding: 1em 1em 1em 1em; background-color:#ddffdd">
{{DisplayBox|title=Documentation|text=
<center><big>'''Documentation'''</big></center>
 
'''Accepted syntaxes for this template:'''
'''Accepted syntaxes for this template:'''


*<tt><nowiki>{{Text|</nowiki>''Language''}}</tt>
*{{tl|Text|''Language''}}


*<tt><nowiki>{{Text|</nowiki>''2''|''Language1''|''Language2''}}</tt>
*{{tl|Text|''2''|''Language1''|''Language2''}}


*<tt><nowiki>{{Text|</nowiki>''3''|''Language1''|''Language2''|''Language3''}}</tt>
*{{tl|Text|''3''|''Language1''|''Language2''|''Language3''}}


*<tt><nowiki>{{Text|</nowiki>''Language''|cat=no}}</tt>
*{{tl|Text|''Language''|cat{{=}}no}}


*<tt><nowiki>{{Text|</nowiki>''2''|''Language1''|''Language2''|cat=no}}</tt>
*{{tl|Text|''2''|''Language1''|''Language2''|cat{{=}}no}}


*<tt><nowiki>{{Text|</nowiki>''3''|''Language1''|''Language2''|''Language3''|cat=no}}</tt>
*{{tl|Text|''3''|''Language1''|''Language2''|''Language3''|cat{{=}}no}}


In the first three cases the template also inserts the page in the corresponding [[:Category:Language texts|Language texts]] category for each language, as well as in {{CiteCat|Macaronic texts}}.  In the second three case, the page is not categorized any any of the Language texts categories (one may also use <nowiki>Cat=no</nowiki> with the same effect).  The default value <nowiki>cat=yes</nowiki> (or <nowiki>Cat=yes</nowiki>) need not be entered).
In the first three cases the template also inserts the page in the corresponding "''Language'' texts" category for each language, as well as in {{CiteCat|Macaronic texts}}.  In the second three case, the page is not categorized in any of the Language texts categories (one may also use {{para|Cat|no}} with the same effect).  The default value {{para|cat|yes}} (or {{para|Cat|yes}}) need not be entered).


'''Examples:'''
'''Examples:'''
*<tt><nowiki>{{Text|2|Latin|German}}</nowiki></tt>
*{{tl|Text|2|Latin|German}}
displays as:
displays as:
: <big>'''{{flag|Latin|show}} and {{flag|German|show}} text'''</big>
:{{Text|2|Latin|German|cat=no}}


*<tt><nowiki>{{Text|Quenya}}</nowiki></tt>
*{{tl|Text|Quenya}}
(for which there is no corresponding language flag) displays as:
(for which there is no corresponding language flag) displays as:
: <big>'''{{flag|Quenya|show}} text'''</big>
:{{Text|Quenya|cat=no}}
</div>[[Category:Templates|{{PAGENAME}}]]</noinclude>
}}
[[Category:Templates]]</noinclude>

Revision as of 14:20, 29 March 2013

{{{1}}} text


Documentation

Accepted syntaxes for this template:

  • {{Text|2|Language1|Language2}}
  • {{Text|3|Language1|Language2|Language3}}
  • {{Text|Language|cat=no}}
  • {{Text|2|Language1|Language2|cat=no}}
  • {{Text|3|Language1|Language2|Language3|cat=no}}

In the first three cases the template also inserts the page in the corresponding "Language texts" category for each language, as well as in Macaronic texts. In the second three case, the page is not categorized in any of the Language texts categories (one may also use |Cat=no with the same effect). The default value |cat=yes (or |Cat=yes) need not be entered).

Examples:

  • {{Text|2|Latin|German}}

displays as:

Latin.png Latin and German.png German text

(for which there is no corresponding language flag) displays as:

Quenya text