Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:T/doc: Difference between revisions

Template page
m internat
m Reverted edits by ~2026-33008-48 (talk) to last revision by 158.106.52.10
 
(72 intermediate revisions by 16 users not shown)
Line 1: Line 1:
{{TemplateBox
{{#switch:{{BASEPAGENAME}}
|1=1
|NLD={{Redirects|NED}}
|1d=template name (any namespace is ignored)
|T={{Redirects|tnlb}}
|1def=[[Template:{{BASEPAGENAME}}|{{BASEPAGENAME}}]]
}}
|1stat=
 
|2=2
 
|2d=display name (displayed as specified)
{{#ifeq:{{PAGENAME}}|Tl|{{Created with/layout|text=For the '''Tagalog language''' template, see {{T|tgl}}|logo=Arrows-move.svg}}}}<!--
|2def=parameter&nbsp;1
-->{{#switch:{{PAGENAME}}|T|Tl|T/main = {{used in system}}}}<!--
|2stat=optional-
 
|3=3
-->{{#ifeq: {{PAGENAME}} | T/main
|3d=interwiki language code (can also be specified with <code>lang=</code>)
| {{Mbox
|3def=
  |text = The {{T0|T/main|+|case=l}} is the main template of  <!-- with simplified code and additional possible parameters. -->
|3stat=optional-
 
* {{T0|T |+|case=l}}
* {{T0|T0|+|case=l}}
* {{T0|T1|+|case=l}}
* {{T0|T2|+|case=l}}
* {{T0|Tl|+|case=l}}
  |type = message
  }}}}<!--
-->__FORCETOC__<!--
-->{{TemplateBox
|name  = {{BASEPAGENAME}}
|desc  = {{Nobold|The '''{{T2|{{BASEPAGENAME}}|T}}''' template creates a formatted link to a '''T'''emplate.}}<br> The {{BASEPAGENAME}} template creates a formatted link to a template{{#switch:{{BASEPAGENAME}}
  |T  = &#32;and surrounds it with braces (<code>{{</code>...<code>}}</code>) included in the link label
  |T0 = &#32;without surrounding braces
  |T1 = &#32;and surrounds it with 2 brace pairs {{Nobold|(making the inner braces a part of the link but not the outer braces)}}
  |T2 = &#32;and surrounds it with 2 brace pairs {{Nobold|which are not a part of the link label}}
  |Tl = &#32;with a monospace font and surrounds it with 2 brace pairs {{Nobold|which are excluded from the link label}}
  }}.
 
|1     = 1
|1d     = template name (any namespace is ignored)
|1def   = {{BASEPAGENAME}}
|1stat =
 
|2     = 2
|2d     = display name (displayed as-it-is)
|2def   = parameter&nbsp;1
|2stat = optional-
 
|3     = 3
|3aliases = lang
|3d     = interwiki language code ({{w|List of ISO 639-1 codes|ISO 639}}), if the template is in another Wikipedia<br />can also be specified with <code>lang=</code>
|3def   =
|3stat = optional-
 
|4      = 4
|4d    = +/-  to precede the template name with the namespace <code>Template:</code>
 
* '''<code>+</code>''' (plus sign)  to make <code>Template:</code> a part of the link,
* '''<code>-</code>''' (minus sign) to precede <code>Template:</code> as plain text.
The +/- parameter can as well be specified with parameter 2 or 3;<br />(when ''both'' signs are specified, "+" has precedence).
|4def  =
|4stat  = optional-


|4=incl
|5      = incl
|4aliases=i
|5aliases = i
|4d=numeric value,
|5d    = <code>i</code> or <code>incl</code> is a one-digit formatting option:
*0:  none of the brackets are part of the link<!-- , &ensp;like {{Tl|Tl|Tl}} -->
*1:  the inner brackets are part of the link  <!-- &ensp;like {{T1|T1}} -->
*2:  both brackets are part of the link<!-- , &ensp;like {{T|T}} -->
*4:  like <code>i=0</code> but with the name typewritten
*5:  like <code>i=1</code> but with the name typewritten
*6:  like <code>i=2</code> but with the name typewritten
*8:  without surrounding brackets
*9:  like <code>i=8</code> but with the name typewritten
|4def={{#switch:{{BASEPAGENAME}}|T=2|T0=8|T1=1|T2=0|#default=?}}
|4stat=optional-


|5=code
* 0:  none of the brackets are part of the link<!-- , &ensp;like {{Tl|Tl|Tl}} -->
|5d=any value, for a sourrounding <code><nowiki><code></nowiki></code> tag &ensp;(like {{T|Tl2}})<br>
* 1:  the inner brackets are part of the link  <!-- &ensp;like {{T1|T1}} -->
With <code>code=tt</code> also the surrounding brackets are typewritten
* 2:  both brackets are part of the link<!-- , &ensp;like {{T|T}} -->
|5def=
* 3:  like <code>i=2</code>, with monospace font
|5stat=optional-
* 4:  like <code>i=0</code> but with the name in teletype style <!-- keyboard style -->
|6=parm
* 5:  like <code>i=1</code> but with the name in teletype style
|6d=to display templates parameters &ensp; (like {{T|Tlx}}) <br> e.g."<code><nowiki>parm=&amp;#124;1=&amp;#124;2=&amp;#124;code=y</nowiki></code>"gives "<code><nowiki>&#124;1=&#124;2=&#124;code=y</nowiki></code>"<br>
* 6:  like <code>i=2</code> but with the name in teletype style
:For a better appearing and easier to format explanatory, use {{T|Tle}}
* 8:  without surrounding brackets
|6def=
* 9:  like <code>i=8</code> but with the name in teletype style ''large'' (font-size:128%)
|6stat=optional-
|5def  = {{#switch:{{BASEPAGENAME}}|T2=0|T1=1|T=2||Tl=3|T0=8|#default=?}}
|5stat  = optional-


|name={{BASEPAGENAME}}
|6      = code
|desc='''{{BASEPAGENAME}}''' links to a '''T'''emplate. It creates a formatted link to a template{{#switch:{{BASEPAGENAME}}
|6d    = any value, for a surrounding <code><nowiki><code></nowiki></code> tag &ensp;(like {{T|Tl2}}).<br /> With <code>code=tt</code> also the surrounding brackets are in teletype style.
|T=&nbsp;and surrounds it with <code>{{</code>...<code>}}</code> making the brackets a part of the link
|6stat  = optional-
|T0=
 
|T1=&nbsp;and surrounds it with two brackets making the inner bracket a part of the link
|8      = link
|T2=&nbsp;and surrounds it with two brackets making the them a part of the link
|8d    = returns plain text instead of a link when set to <code>link=no</code>
|Tl=}}.
|8stat  = optional-
|namespace=all
 
|usergroup=all
|9      = case
|placement=
|9d    = for formatting of the namespace prefix:
|usage-notes=
|type=
|i18n-method=-
||example=
|example-value=
|seealso=
|setscats=
|lines=
|shorthand=
|relieson=
|mustbesubst=
}}
__NOTOC__


<u>Note:</u> The templates T, T0, T1, T2, Tl contain the same code with the only difference of the default value for the parameter <code>incl=</code>.<br>
* <code>case=l</code> lowercase display "{{lcfirst:{{ns:10}}}}" instead of "{{ns:10}}"
{| class="wikitable" style="text-align:center"
* <code>case=i</code> internationalized display, in general a link 
! Template !! <code>i</code> !! appearance
* <code>case=n</code> internationalized display, without linking it
|-
|9stat = optional-
|{{T0|T}} || 2  || {{T|T}}
|-
|{{T0|T0}} || 8  || {{T0|T0}}
|-
|{{T0|T1}} || 1  || {{T1|T1}}
|-
|{{T0|T2}} || 0  || {{T2|T2}}
|-
|{{T0|Tl}} || 2  || {{Tl|Tl}}
|}


This means that ''each of them'' can be converted into ''each one of the others'' by just replacing that parameter:
|10    = i18n
{| class="collabsible collapse"
|10d    = another language than <code><nowiki>{{int:lang}}</nowiki></code> for namespace translation (when <code>case=i</code> or <code>case=n</code>)
|-
|10def  = {{int:lang}}
| style="text-align:center" | T || <nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|</nowiki>'''2'''<nowiki>}}}}}}|code={{{code|}}}}}</nowiki> || style="text-align:center" | {{{{BASEPAGENAME}}|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|2}}}}}}|code={{{code|}}}}}
|10stat = optional-
|-
| T0 || <nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|</nowiki>'''8'''<nowiki>}}}}}}|code={{{code|}}}}}</nowiki> || style="text-align:center" | {{{{BASEPAGENAME}}|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|8}}}}}}|code={{{code|}}}}}
|-
| T1 || <nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|</nowiki>'''1'''<nowiki>}}}}}}|code={{{code|}}}}}</nowiki> || style="text-align:center" | {{{{BASEPAGENAME}}|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|1}}}}}}|code={{{code|}}}}}
|-
| T2 || <nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|</nowiki>'''0'''<nowiki>}}}}}}|code={{{code|}}}}}</nowiki> || style="text-align:center" | {{{{BASEPAGENAME}}|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|0}}}}}}|code={{{code|}}}}}
|-
| Tl || <nowiki><tt>{{</nowiki>{{BASEPAGENAME}}<nowiki>|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|</nowiki>'''2'''<nowiki>}}}}}}|code={{{code|}}}}}</tt></nowiki> || style="text-align:center" | <tt>{{{{BASEPAGENAME}}|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|2}}}}}}|code={{{code|}}}}}</tt>
|-
| Tl ||<nowiki>{{#tag:tt|{{</nowiki>{{BASEPAGENAME}}<nowiki>|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|</nowiki>'''2'''<nowiki>}}}}}}|code={{{code|}}}}}}}</nowiki> || style="text-align:center" | {{#tag:tt|{{{{BASEPAGENAME}}|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|2}}}}}}|code={{{code|}}}}}}}
|}
<small>(Because the templates T and Tl are both editprotected currently only T0 and T1 are maintained; the examples below may not work well with other templates.)</small><br>


== Examples ==
|11    = parm
* {{tlf| {{BASEPAGENAME}} |information}} {{ {{BASEPAGENAME}} |information}}
|11d    = to display templates parameters &ensp;(like {{T|Tlx}})<br />
Usage e.g. <code>parm=template name</code> or <code>parm=1=template name</code><br />
or &ensp;<code><nowiki>parm=&amp;#124;1=&amp;#124;2=&amp;#124;code=y</nowiki></code>" gives
"<code><nowiki>&#124;1=&#124;2=&#124;code=y</nowiki></code>".
:{{F|Font Awesome 5 solid long-arrow-alt-right.svg|Z|18}} For a better appearing and ''easier to format'' explanatory, use the meta template {{T1|Tle|<code><big>Tle</big></code>|i=6}}.
|11stat = optional-


*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki> → {{ {{BASEPAGENAME}} }}
|12    = full
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|coltit}}</nowiki> → {{ {{BASEPAGENAME}} |coltit}}
|12d    = expanded display: {{T|Example|5=full|+|i=2}} &ensp;(like {{T|Lts}})<br/>
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|incl=0}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|incl=0}}
request this expansion with either <code>full=5</code> or <code>5=full</code>.
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|incl=1}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|incl=1}}
|12stat = optional-
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|incl=2}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|incl=2}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|incl=4}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|incl=4}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|incl=5}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|incl=5}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|incl=6}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|incl=6}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|incl=8}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|incl=8}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|incl=9}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|incl=9}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|coltit}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|coltit}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|test|en}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|test|en}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|3=de}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|3=de}}<br>
with <code>code=y</code>
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|U|user|code=y|parm=&amp;#124;1=&amp;#124;2=&amp;#124;parameter=}}</nowiki> → {{ {{BASEPAGENAME}} |U|user|code=y|parm=&#124;1=&#124;2=&#124;parameter=}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|coltit|code=y}}</nowiki> → {{ {{BASEPAGENAME}} |coltit|code=y}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|coltit|code=y|excl=y}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|coltit|code=y|excl=y}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|color titling|en|code=y}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|color titling|en|code=y}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|3=de|code=y}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|3=de|code=y}}


|namespace    = all
|usergroup    = all
|placement    =
|usage-notes  =
|type          =
|example      =
|example-value =
|seealso      =
|setscats      =
|lines        =
|shorthand    =
|relieson      =
|mustbesubst  =
|i18n-method  = -
|i18n-desc    = The template does not generate any localizable text;<br />
with + or - always the ''namespace'' in English: "{{ns:10}}" is displayed;<br />
only in combination with <code>case=i</code> or <code>case=n</code> the namespace can be translated using the {{T2|i18n/namespace|LangSwitch}} construct (according to <code>i18n</code>).
}}
{{Commons:Link templates/T-doc-expansion}} <!-- subpage -->


{{Commons:Link templates/Template links}}
{{Commons:Link templates/Template links}} <!-- linktab -->


<includeonly>
<includeonly>
[[Category:Typing-aid templates|{{PAGENAME}}]]
[[Category:Internal link templates]]
[[Category:Internal link templates|{{PAGENAME}}]]
[[Category:Interwiki link templates]]
[[Category:Interwiki link templates|{{PAGENAME}}]]
[[Category:Typing-aid templates]]
{{#ifeq:{{PAGENAME}}|T|[[Category:One-letter templates| ]]}}
</includeonly>
</includeonly>

Latest revision as of 05:50, 3 June 2026


The {{T}} template creates a formatted link to a Template.
The T template creates a formatted link to a template and surrounds it with braces ({{...}}) included in the link label.

Usage

{{T |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1template name (any namespace is ignored)Toptional
2display name (displayed as-it-is)parameter 1optional
3
lang
interwiki language code (ISO 639), if the template is in another Wikipedia
can also be specified with lang=
emptyoptional
4+/- to precede the template name with the namespace Template:
  • + (plus sign) to make Template: a part of the link,
  • - (minus sign) to precede Template: as plain text.
The +/- parameter can as well be specified with parameter 2 or 3;
(when both signs are specified, "+" has precedence).
emptyoptional
incl
i
i or incl is a one-digit formatting option:
  • 0: none of the brackets are part of the link
  • 1: the inner brackets are part of the link
  • 2: both brackets are part of the link
  • 3: like i=2, with monospace font
  • 4: like i=0 but with the name in teletype style
  • 5: like i=1 but with the name in teletype style
  • 6: like i=2 but with the name in teletype style
  • 8: without surrounding brackets
  • 9: like i=8 but with the name in teletype style large (font-size:128%)
2optional
codeany value, for a surrounding <code> tag  (like {{Tl2}}).
With code=tt also the surrounding brackets are in teletype style.
emptyoptional
linkreturns plain text instead of a link when set to link=noemptyoptional
casefor formatting of the namespace prefix:
  • case=l lowercase display "template" instead of "Template"
  • case=i internationalized display, in general a link
  • case=n internationalized display, without linking it
emptyoptional
i18nanother language than {{int:lang}} for namespace translation (when case=i or case=n)enoptional
parmto display templates parameters  (like {{Tlx}})

Usage e.g. parm=template name or parm=1=template name
or  parm=&#124;1=&#124;2=&#124;code=y" gives "|1=|2=|code=y".

For a better appearing and easier to format explanatory, use the meta template {{Tle}}.
emptyoptional
fullexpanded display: Template:{{Example}}  (like {{Lts}})
request this expansion with either full=5 or 5=full.
emptyoptional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

Localization

This template is not intended to be localized.

The template does not generate any localizable text;
with + or - always the namespace in English: "Template" is displayed;
only in combination with case=i or case=n the namespace can be translated using the {{LangSwitch}} construct (according to i18n).

{{Commons:Link templates/T-doc-expansion}}

{{Commons:Link templates/Template links}}


Cookies help us deliver our services. By using our services, you agree to our use of cookies.