Template:Text: Difference between revisions
(replaced template:Switch with parser function #switch) |
No edit summary |
||
Line 1: | Line 1: | ||
< | <onlyinclude>{{#ifeq:{{{2|}}}|put text here|{{#if:{{{1|}}}|{{NoText|{{{1|}}}}}|{{NoText}}}}|{{#switch:{{{1|}}}| ={{NoText|{{{text|{{{2|}}}}}}}}|Unknown=<b><big>Unknown language</big></b>{{#tag:poem|{{{text|{{{2}}}}}} }}<includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:Unknown language texts]]}}</includeonly>|Unavailable={{TextUnavailable}}|2=<b><big>{{flag|{{{2}}}|show}} and {{flag|{{{3}}}|show}} text</big></b><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{2}}} texts]][[Category:{{{3}}} texts]][[Category:Macaronic texts|2 {{PAGENAME}}]]}}</includeonly>{{#if:{{{text|{{{4|}}}}}}|{{#tag:poem|{{{text|{{{4}}}}}} }}}}|3=<b><big>{{flag|{{{2}}}|show}}, {{flag|{{{3}}}|show}} and {{flag|{{{4}}}|show}} text</big></b><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{2}}} texts]][[Category:{{{3}}} texts]][[Category:{{{4}}} texts]][[Category:Macaronic texts|3 {{PAGENAME}}]]}}</includeonly>{{#if:{{{text|{{{5|}}}}}}|{{#tag:poem|{{{text|{{{5}}}}}} }}}}|Simple=<big> </big>{{#tag:poem|{{{2}}} }}|#default=<b><big>{{flag|{{{1}}}}} {{{pre|}}} {{{1}}} {{{post|}}} text</big></b><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{1}}} texts]]}}</includeonly>{{#tag:poem|{{{text|{{{2}}}}}} }}}}}}</onlyinclude><noinclude>{{prot-temp}}<br> | ||
| | |||
| | |||
|Unavailable={{TextUnavailable}} | |||
|2=<b><big>{{flag|{{{2}}}|show}} and {{flag|{{{3}}}|show}} text</big></b><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{2}}} texts]][[Category:{{{3}}} texts]][[Category:Macaronic texts|2 {{PAGENAME}}]]}}</includeonly>{{#if:{{{text|{{{4|}}}}}}|{{#tag:poem|{{{text|{{{4}}}}}} }}}} | |||
|3=<b><big>{{flag|{{{2}}}|show}}, {{flag|{{{3}}}|show}} and {{flag|{{{4}}}|show}} text</big></b><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{2}}} texts]][[Category:{{{3}}} texts]][[Category:{{{4}}} texts]][[Category:Macaronic texts|3 {{PAGENAME}}]]}}</includeonly>{{#if:{{{text|{{{5|}}}}}}|{{#tag:poem|{{{text|{{{5}}}}}} }}}} | |||
|Simple=<big> </big> | |||
|#default=<b><big>{{flag|{{{1}}}}} {{{pre|}}} {{{1}}} {{{post|}}} text</big></b><includeonly>{{#ifeq:{{{cat|{{{Cat|yes}}}}}}|no||[[Category:Texts]][[Category:{{{1}}} texts]]}}</includeonly> | |||
}}</ | |||
{{prot-temp}}<br> | |||
{{Doc|text= | {{Doc|text= | ||
'''Accepted syntaxes for this template:''' | '''Accepted syntaxes for this template:''' | ||
*{{tl|Text}} and {{tl|Text| }} default to {{tl|NoText}} | *{{tl|Text}} and {{tl|Text| }} and {{tl|Text||put text here}} default to {{tl|NoText}} | ||
*{{tl|Text|<language>|put text here}} defaults to {{tl|NoText|<language>}} (AddWork form uses this) | |||
*{{tl|Text|Unknown}} and {{tl|Text|Unknown| }} default to {{tl|NoText}} | *{{tl|Text|Unknown}} and {{tl|Text|Unknown| }} default to {{tl|NoText}} | ||
Line 38: | Line 30: | ||
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). | 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). | ||
<b><u>Examples:</u></b> | |||
*{{tl|Text|Unknown}} | *{{tl|Text|Unknown}} | ||
Line 52: | Line 44: | ||
:{{Text|2|Latin|German|cat=no}} | :{{Text|2|Latin|German|cat=no}} | ||
*{{tl|Text|Quenya}} | *{{tl|Text|Quenya}} (for which there is no corresponding language flag) displays as: | ||
(for which there is no corresponding language flag) displays as: | |||
:{{Text|Quenya|cat=no}} | :{{Text|Quenya|cat=no}} | ||
<b><u>Formatting text</u></b> (See [[Help:How can I add a text or translation?]] for more details) | |||
< | |||
< | |||
<pre>{{Text|Latin| | <pre>{{Text|Latin| | ||
Ave Maria, gratia plena, Dominus tecum. | Ave Maria, gratia plena, Dominus tecum. | ||
Line 73: | Line 56: | ||
}} | }} | ||
[[Category:Templates]] | |||
[[Category:Text formatting templates]]</noinclude> | [[Category:Text formatting templates]]</noinclude> |
Revision as of 18:04, 23 March 2021
Text (or link to a text page) needs to be added.
This high-risk template has been protected from editing to prevent vandalism. Please use the talk page to ask an administrator about making an edit to change this template. |
Accepted syntaxes for this template:
- {{Text|Unknown|some text}} displays the language as unknown and displays "some text" with Poem formatting.
- {{Text|Language}} displays the language of the text
- {{Text|2|Language1|Language2}} displays the two languages of the text
- {{Text|3|Language1|Language2|Language3}} displays the three languages of the text
In these last three cases the text may be entered as final (unnamed) parameter and will be displayed with Poem formatting.
Also, in these three cases where a language is specified, the template also inserts the page in the corresponding "Language texts" category for each language, as well as in Macaronic texts, except when the following syntax is used:
- {{Text|Language|cat=no}}
- {{Text|2|Language1|Language2|cat=no}}
- {{Text|3|Language1|Language2|Language3|cat=no}}
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|Unknown}}
displays as:
- Unknown language
{{{2}}}
- {{Text| |French}}
displays as:
- {{Text|2|Latin|German}}
displays as:
- Latin and German text
- {{Text|Quenya}} (for which there is no corresponding language flag) displays as:
- Quenya text
{{{2}}}
Formatting text (See Help:How can I add a text or translation? for more details)
{{Text|Latin| Ave Maria, gratia plena, Dominus tecum. Benedicta tu in mulieribus, et benedictus fructus ventris tui, Jesus. }}