VOOZH about

URL: https://commons.wikimedia.org/wiki/Template:Tl

โ‡ฑ Template:Tl - Wikimedia Commons


Jump to content
From Wikimedia Commons, the free media repository
๐Ÿ‘ Protected
This template has been protected from editing to prevent vandalism.
Please discuss changes on the talk page or request unprotection.
๐Ÿ‘ Image
Template documentation
[โ€ฏview ยท edit ยท history ยท purgeโ€ฏ]
This documentation is transcluded from Template:T/doc.


๐Ÿ‘ Image
 For the Tagalog language template, see {{Tgl}}
๐Ÿ‘ Warning
This template is used in system messages.
Changes to it can cause immediate changes to the Wikimedia user interface.
To avoid major disruption, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Please discuss changes on the talk page before implementing them.

The {{}} template creates a formatted link to a Template.
The Tl template creates a formatted link to a template with a monospace font and surrounds it with 2 brace pairs which are excluded from the link label.

Usage

{{Tl |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1template name (any namespace is ignored)Tloptional
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%)
3optional
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".

๐Ÿ‘ Image
For a better appearing and easier to format explanatory, use the meta template {{}}.
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).

[edit subpage]

The templates T, T0, T1, T2, Tl, T9 use the same main template with the only difference of the default value for the parameter incl=.

Template i appearance
2 {{T}}
8 T0
1 {{T1}}
0 {{T2}}
3
9 T9
This means that each of them can be converted into each one of the others by just replacing that parameter:
T {{Tl|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|2}}}}}}|code={{{code|}}}}} WWWWWWWWWWWW
T0 {{Tl|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|8}}}}}}|code={{{code|}}}}}
T1 {{Tl|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|1}}}}}}|code={{{code|}}}}} {}
T2 {{Tl|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|0}}}}}}|code={{{code|}}}}} {{}}
Tl {{Tl|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|3}}}}}}|code={{{code|}}}}}}}
T9 {{Tl|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|9}}}}}}|code={{{code|}}}}}


Examples

  • {{Tl}} โ†’
  • {{Tl|coltit}} โ†’ {{Coltit}}
  • {{Tl|Coltit|incl=0}} โ†’ {{Coltit}}
  • {{Tl|Coltit|incl=1}} โ†’ {{Coltit}}
  • {{Tl|Coltit|incl=2}} โ†’ {{Coltit}}
  • {{Tl|Coltit|incl=3}} โ†’ {{Coltit}}
  • {{Tl|Coltit|incl=4}} โ†’ {{}}
  • {{Tl|Coltit|incl=5}} โ†’ {{}}
  • {{Tl|Coltit|incl=6}} โ†’ {{}}
  • {{Tl|Coltit|incl=8}} โ†’ Coltit
  • {{Tl|Coltit|incl=9}} โ†’
  • {{Tl|Coltit|coltit}}0 โ†’ {{coltit}}
  • {{Tl|Coltit|test|it}} โ†’ {{test}}
  • {{Tl|Coltit|3=de}}0 โ†’ {{Coltit}}
  • {{Tl|{U|parm=user name}} โ†’ {{U|user name}}
  • {{Tl|U|parm=1=user name}} โ†’ {{U|1=user name}}

with code=y

๐Ÿ‘ Lua logo
Uses Lua:
The following examples are Lua supportet:

The parameter case (with the other parameters supporting it) intends to be rarely used, but when in a textual environment a special appearance is desired, with the namespace prefix in different formats, the following concealed tables shows the possibilities. All combinations are possible but not every one is useful.

Table: different displays for {{}} with the namespace option 0
{{  | example }} 0this is the standard {{Example}}
{{ Tlexample- }} Template:{{Example}}
{{ Tlexample-case = l }} template:{{Example}}
{{ Tlexample-case = i }} LangSwitch Error: no default:{{Example}}
{{ Tlexample-case = n }} template:{{Example}}
{{ TlExample+ }} Template:{{Example}}
{{ Tlexample+case = l }} template:{{Example}}
{{ Tlexample+case = i }} template:{{Example}}
{{ Tlexample+case = n }} template:{{Example}}
{{ TlExamplelink = n }} {{Example}}
{{ TlExample-link = n }} Template:{{Example}}
{{ Tlexample-link = ncase = l }} template:{{Example}}
{{ Tlexample-link = ncase = i }} LangSwitch Error: no default:{{Example}}
{{ Tlexample-link = ncase = n }} template:{{Example}}
{{ Tlexample+link = n }} Template:{{Example}}
{{ Tlexample+link = ncase = l }} template:{{Example}}
{{ Tlexample+link = ncase = i }} LangSwitch Error: no default:{{Example}}
{{ Tlexample+link = ncase = n }} template:{{Example}}
Large table with displays for {{}} with the namespace option 0
link ns case i= i=0 i=1 i=2 i=3 i=4 i=5 i=6 i=8 i=9
0 0 0 {{}} {} {{}} {}
0 + 0
0 + l
0 + i
0 + n
0 - 0 Template: Template:{{}} Template:{} Template: Template: Template:{{}} Template:{} Template: Template: Template:
0 - l template: template:{{}} template:{} template: template: template:{{}} template:{} template: template: template:
0 - i LangSwitch Error: no default: LangSwitch Error: no default:{{}} LangSwitch Error: no default:{} LangSwitch Error: no default: LangSwitch Error: no default: LangSwitch Error: no default:{{}} LangSwitch Error: no default:{} LangSwitch Error: no default: LangSwitch Error: no default: LangSwitch Error: no default:
0 - n template: template:{{}} template:{} template: template: template:{{}} template:{} template: template: template:
no 0 0 Tl {{Tl}} {{Tl}} {{Tl}} {{Tl}} {{Tl}} {{Tl}} {{Tl}} Tl Tl
no + 0 Template:Tl Template:{{Tl}} Template:{{Tl}} Template:{{Tl}} Template:{{Tl}} Template:{{Tl}} Template:{{Tl}} Template:{{Tl}} Template:Tl Template:Tl
no + l template:Tl template:{{Tl}} template:{{Tl}} template:{{Tl}} template:{{Tl}} template:{{Tl}} template:{{Tl}} template:{{Tl}} template:Tl template:Tl
no + i LangSwitch Error: no default:Tl LangSwitch Error: no default:{{Tl}} LangSwitch Error: no default:{{Tl}} LangSwitch Error: no default:{{Tl}} LangSwitch Error: no default:{{Tl}} LangSwitch Error: no default:{{Tl}} LangSwitch Error: no default:{{Tl}} LangSwitch Error: no default:{{Tl}} LangSwitch Error: no default:Tl LangSwitch Error: no default:Tl
no + n template:Tl template:{{Tl}} template:{{Tl}} template:{{Tl}} template:{{Tl}} template:{{Tl}} template:{{Tl}} template:{{Tl}} template:Tl template:Tl
no - 0 Template:Tl Template:{{Tl}} Template:{{Tl}} Template:{{Tl}} Template:{{Tl}} Template:{{Tl}} Template:{{Tl}} Template:{{Tl}} Template:Tl Template:Tl
no - l template:Tl template:{{Tl}} template:{{Tl}} template:{{Tl}} template:{{Tl}} template:{{Tl}} template:{{Tl}} template:{{Tl}} template:Tl template:Tl
no - i LangSwitch Error: no default:Tl LangSwitch Error: no default:{{Tl}} LangSwitch Error: no default:{{Tl}} LangSwitch Error: no default:{{Tl}} LangSwitch Error: no default:{{Tl}} LangSwitch Error: no default:{{Tl}} LangSwitch Error: no default:{{Tl}} LangSwitch Error: no default:{{Tl}} LangSwitch Error: no default:Tl LangSwitch Error: no default:Tl
no - n template:Tl template:{{Tl}} template:{{Tl}} template:{{Tl}} template:{{Tl}} template:{{Tl}} template:{{Tl}} template:{{Tl}} template:Tl template:Tl

[edit subpage]

Template links

List of templates using {{T/main}}
Code Result Notes lock

{{|example}}

{{Example}} makes brackets part of the link ๐Ÿ‘ Image

{{|example}}

Example just link, without the brackets ๐Ÿ‘ Image

{{|example}}

{{Example}} inner brackets are part of the link ๐Ÿ‘ Image

{{|example}}

{{Example}} brackets are not a part of the link ๐Ÿ‘ Image

{{|example}}

{{Example}} makes brackets around the link ๐Ÿ‘ Image

{{|User:Example}}

{{User:Example}} like {{tl}} but for any namespace ๐Ÿ‘ Image

{{|example}}

{{subst:example}} no parameters, adds "subst:" ๐Ÿ‘ Image
Templates showing parameters 0 Meta template {{}} is easiest to parametrize.

{{|T=F|p1=1|v1|p2=2|v2|p3=3|v3}}

{{ F | 1 = v1 | 2 = v2 | 3 = v3 }} describes template parameters by names and values ๐Ÿ‘ Image

{{|example|1|2|3|4|5||7|8|9}}

{{example|1|2|3|4|5|7|8|...}} up to 8 parameters ๐Ÿ‘ Image

{{|example|1|2|3|...up to 8}}

{{example|1|2|3|...up to 8}} up to 8 parameters, no link ๐Ÿ‘ Image

{{|example|1|2|3|4|||7|up to 8|9 is ignored.}}

{{example|1|2|3|4|||7|up to 8}} up to 8 parameters, no link, <code> style ๐Ÿ‘ Image

{{|example|1|2||3||}}

{{example|1||2|3||}} up to 8 parameters, <code> style[clarification needed] ๐Ÿ‘ Image

{{|User:Example}}

{{subst:User:Example}} like {{Tls}}, but supporting parameters ๐Ÿ‘ Image
Alternative forms 0 These ignore empty parameters.

{{|example|1|2|3|4|5||7|8|9 is ignored.}}

{{example|1|2|3|4|5|7|8}} up to 8 parameters; ignores empty parms ๐Ÿ‘ Image

{{|example|p1|p2}}

{{example|p1|p2}} up to 2 parameters, <code> style ๐Ÿ‘ Image

{{|example|1|2|3|4|5|6|7|8|9}}

{{subst:example|1|2|3|4|5|6|7|8|...}} up to 8 parameters, adds linked "subst:" ๐Ÿ‘ Image

{{|example|1|2|3|4|5|6 and above are ignored.|7}}

{{subst:example|1|2|3|4|5|...}} up to 5 parameters, adds linked "subst:", <code> style ๐Ÿ‘ Image

General-purpose formatting

Comparison of template-linking templates according to the styles of generated text and link produced
Text style โ†“ {{tlg}} options[note 1]
to achieve text style
Link style
Linked Unlinked Linked with subst Unlinked with subst Linked including braces
{{tlg}} options[note 1]
to achieve link style
N/A DEFAULT nolink=yes subst=yes nolink=yes|subst=yes braceinside=yes
normal DEFAULT N/A
code code=yes
N/A
monospace mono=yes[note 4] N/A N/A
plaincode plaincode=yes[note 5]
[clarification needed] kbd=yes[note 6]
  1. โ†‘ a b c {{tlg}} is the most general template, allowing any combination of text style and/or link style options.
  2. โ†‘ a b c d e Prevents wrapping of text by placing it inside <span class="nowrap">...</span> tags.
  3. โ†‘ a b c Allows links to templates in any namespace.
  4. โ†‘ a b c d Displays monospaced font using <span style="font-family: monospace;">...</span>.
  5. โ†‘ {{tlg|plaincode=yes}} uses <code style="border: none; background-color: transparent;">...</code>.
  6. โ†‘ {{tlg|kbd=yes}} uses <kbd>...</kbd>.