Changes
Jump to navigation
Jump to search
m
format
{{Heavily used template|Template talk:F|edit=✔}}
{{Lua|Module:File|Module:Galeria}}
{{TemplateBox
| 1 = 1
| 1label = File Name
| 1d-en = [[#File Name|Name of the file]], with or without namespace; [[#Asterisk|or <code>*</code>]]<br>underscores contained in the filename are replaced by spaces.
| 1d-td-en = Name of the file, with or without namespace; or “*”. Underscores contained in the filename are replaced by spaces.
| 1stat = required
| 1type = wiki-file-name
| 2 = 2
| 2label = Display Name
| 2d-en = [[#Display Name|Any text]], default is the file name (parameter #1). If there is no alternate text the parameter #2 instead can hold the first [[#option|option]].
| 2d-td-en = Any text. If there is no alternate text parameter #2 instead can hold the first "option".
| 2default = ''File Name''
| 2default-td = The file name (parameter #1).
| 2stat = optional-
| 2type = line
| 3 = 3
| 3label = Image size
| 3d-en = Numeric value for the [[#Image size|image size]]. The picture is displayed inline in this size
| 3d-td-en = The picture is displayed inline in this size.
| 3stat = optional-
| 3type = number
| 4 = 4
| 4label = ''Option''
| 4d = [[#Option b|Option: '''b''']] (lowercase B) to draw a '''''b'''order'' around the displayed picture
| 4d-td = <nowiki/>
; b (lowercase B)
: Draw a border around the displayed picture
<nowiki/>
| 4sv = b
| 4stat = optional-
| 4type = string
| 5 = 5
| 5label = ''Option''
| 5d = [[#Option l|Option: '''l''']] (lowercase L) to display the image <i>'''l'''eft</i> of the file name<br>[[#Option r|Option: '''r''']] (lowercase R) to display the image to the '''''r'''ightmost''
| 5d-td = <nowiki/>
; l (lowercase L)
: Display the image to the left of the file name
; r (lowercase R)
: Display the image to the right of the file name
<nowiki/>
| 5sv = l/r
<nowiki/>
| 5stat = optional-
| 5type = string
| 6 = 6
| 6label = ''Option''
| 6d = [[#Option n|Option: '''n''']] (lowercase N) to display the name '''''n'''ot-linking'' to the file
| 6d-td = <nowiki/>
; n (lowercase N)
: Display the name not-linking to the file
<nowiki/>
| 6sv = n
| 6stat = optional-
| 6type = string
| 7 = 7
| 7label = ''Option''
| 7d = [[#Option +|Option: '''+''']] to display the namespace prefix “File:” as part of the link<br>[[#Option -|Option: '''-''']] to not display the prefix “File:” as part of the link
| 7d-td = <nowiki/>
; +
: Display the namespace prefix “File:” as part of the link
; -
: Display the namespace prefix “File:” outside the link
<nowiki/>
| 7sv = +/-
| 7stat = optional-
| 7type = string
| 8 = 8
| 8label = ''Option''
| 8d = [[#Option Z|Option: '''Z''']] (uppercase Z) to suppress the display of the file name
| 8d-td = <nowiki/>
; Z (uppercase Z)
: Suppress the display of the file name
<nowiki/>
| 8sv = Z
| 8stat = optional-
| 8type = string
| 9 = 9
| 9label = File Function Letter
| 9d = Different functions can be performed, see [[#File Function Letters|File Function Letters]].
| 9d-td = Different functions can be performed.
| 9stat = optional-
| 9type = string
| 10 = t
| 10label = Separator
| 10d = The [[#Separator|separator]] can be any text string, used between displayed file name and displayed image<br />
Use uppercase <code>T=</code> to precede the string with a space
| 10d-td = Used between the displayed file name and displayed image.
Use uppercase “T=” to precede the string with a space.
| 10def = &nbsp;
| 10def-td =
| 10stat = optional-
| 10type = line
| 11 = p
| 11label = Prefix
| 11d = a prefix to be written in advance; e.g. <code><nowiki>p=<br/></nowiki></code> for a new line
| 11d-td = A prefix to be written in advance; e.g. “p={{^(}}br/{{)^}}” for a new line
| 11stat = optional-
| 11type = line
| 12 = l
| 12label = Interwiki & interlanguage link
| 12d = For {{w|Help:Interlanguage links|interlanguage linking}} with {{w|List of ISO 639-1 codes|ISO 639 codes}} if the file is in another Wikipedia and for {{w|Help:Interwiki linking|Interwiki linking}} if the file is in a Wikimedia sister project, see [[#l|parameter "l"]].
| 12d-td = For interlanguage linking with ISO 639 codes if the file is in another Wikipedia and for Interwiki linking if the file is in a Wikimedia sister project.
| 12stat = optional-
| 12type = string
| 13 = lang
| 13label = SVG language switch
| 13d = language code ({{W|ISO 639-1|ISO 639}}), to display a translated version when the SVG file [[Commons:Translation possible/Learn more#Multiple translations within one SVG file|contains translations]] using SVG {{tag|switch|o}} elements, see [[#lang|Parameter "lang"]].
| 13d-td = language code (ISO 639), to display a translated version when the SVG file contains translations using SVG {{^(}}switch{{)^}} elements.
| 13stat = optional-
| 13type = string
| 14 = link
| 14label = Link
| 14d = enables to link to somewhere else
| 14stat = optional-
| 14type = wiki-page-name
<!--
| 15 = text
| 15label = Trailing text
| 15d = trailing text, e.g. in a file list
| 15stat = optional-
| 15type = wiki-page-name
-->
| 16 = by
| 16label = Author
| 16d = can be used to display the user who created the file, see [[#Author|parameter "by"]]
| 16d-td = can be used to display the user who created the file
| 16stat = optional-
| 16type = wiki-user-name
| 19 = u
| 19label = Author modification code
| 19d = modification of the "by"-user, e.g. <code>t</code>, <code>w</code>, <code>wt</code>,<br>see [[#u|parameter "u"]]
| 19d-td = modification of the "by"-user, e.g. "u=t", "u=w" or "u=wt"
| 19stat = optional-
| 19type = code
| name = F
| desc-td = Establishes a link to the file whose name is given in parameter #1 and displays the name without the prefix "File:".
|desc=<big>Establishes a link to the file whose name is given in parameter #1 and displays the name without the prefix "File:".</big><br />
* {{nobold|Instead of the file name, any text given in parameter #2 can be displayed.}}
* {{nobold|The file itself (the image) can be displayed at any size inline, after the name.}}
:''For more details go to [[#Standard usage|standard usage]].''
Additional possibilities:
* {{nobold|It is possible to display the image left of the name to allow better text alignment when arranging in several lines, ''see [[#Option l|Option "l"]]''}}
*{{nobold|It is possible to avoid the link and display the plain name of parameter #1 (or parameter #2), ''see [[#Option n|Option "n"]]''.}}
*{{nobold|It is possible to avoid any display of the name but display the image, ''see [[#Option Z|Option "Z"]]''.}}
*{{nobold|The displayed image can be surrounded by a border, ''see [[#Option b|Option "b"]]''.}}
:''For more details go to [[#Extended usage|extended usage]].''
|namespace=all
|usergroup=all
|i18n-method=-
|i18n-desc=<!--The template does not generate any localizable text.-->
|usage-notes=
|seealso=
Some templates using {{T2|F}} can display an <u>unlimited number</u> of files, names and/or images, with possibly other display names and many other modifying parameters:
* {{tle|T=File|…}} – displays horizontally an unlimited number of files, after the internationalized text "File:"
* {{tle|T=Filelist|…}} – displays horizontally an unlimited number of files: {{Tle|t=Filelist|1=filename 1|2=filename 2|3=filename 3|4= … }}
* {{tle|T=Other versions}} – to display vertically an unlimited number of files, e.g. in the <code>Other versions=</code> field
* {{tle|T=Derived from|…}} – displays vertically, after text
* {{tle|T=Derivative versions|…}} – displays vertically, after text
| useTemplateData = 1
}}
== Standard usage ==
{{Anchor|File Name}}'''Parameter #1''' (File Name) is the only parameter which is required. It can only hold the filename; with or without "File:" – the displayed file name is in both cases without "File:". Underscores ("_") contained in the filename are replaced by spaces.
{{Anchor|Display Name}}'''Parameter #2''' (Display Name) can hold an alternate text (instead of the file name) which can only be passed with this parameter. Underscores ("_") contained in the display name are displayed. If there is no given alternate text parameter #2 can instead hold the first [[#option|option]].
{{Anchor|Image size}}'''Parameter #3''' (Image size) can hold the displayed image size which can only be passed with this parameter. By default the image is displayed right of the file name. This could be changed with [[#option l|option "l"]]. Formats for the image size are e.g. <code>96</code> or <code>x64</code> or <code>60x16</code>. It is '''''not possible''''' to display images of other Wikipedias - only when the files are stored in the Commons!
;'''''Examples'''''
{| class="wikitable"
! Syntax || Code || Result || Note
|-
| {{Tle|t=F|file name}} || <nowiki>{{F|SVG_Simple_Icon.svg}}</nowiki><br><nowiki>{{F|File:SVG_Simple_Icon.svg}}</nowiki>|| {{F|SVG_Simple_Icon.svg}} ||is the simplest form; it displays the file name as a link to the file.
|-
| {{Tle|t=F|file name|any text}}|| <nowiki>{{F|SVG_Simple_Icon.svg|example}}</nowiki> || {{F|SVG_Simple_Icon.svg|example}} || displays the text string of the 2{{exp|nd}} parameter as a link to the file.
|-
| {{Tle|t=F|file name||size}}|| <nowiki>{{F|SVG_Simple_Icon.svg||16}}</nowiki> || {{F|SVG_Simple_Icon.svg||16}} || displays first the file name, and then the image with a [[#Image size|size in px]].
|-
| {{Tle|t=F|file name|any text|size}} || <nowiki>{{F|SVG_Simple_Icon.svg|SVG|16x16}}</nowiki> || {{F|SVG_Simple_Icon.svg|SVG|16x16}} || is the same but ''any text'' is displayed instead of the file name.
|} {{Anchor|Asterisk}}
''Note:''
* When parameter #1 contains an asterisk (the value * ) instead of the file name, that will be replaced by the <tt><nowiki>{{PAGENAME}}</nowiki></tt>; this is possible only in the <tt>file</tt> namespace.
== Extended usage ==
=== Parameters #4 to #8 – Options{{Anchor|Options}} ===
In comparison to parameters #1, #2 and #3 the “options” (b, n, l, r, +, -, Z) are not fixed to a parameter position. Anyone of them can be passed/specified in any sequence with every '''parameter #4 to #8''' (or '''even #2''' when no text is passed). There are the following options:
;{{Anchor|Option b}}Option "b"
* <code>b</code> draws a '''<u>b</u>'''order around the image. This can be useful to show the extensions of the image.
;{{Anchor|Option l}}Option "l"
* <code>l</code> displays the image <u>'''l'''</u>eft of the name. This option allows a better formatting, e.g. when more files are displayed in a list and the file names are of different length:<br />{{Tle|t=F|file name|<nowiki />|size|l}} (or <code><nowiki>{{F|file name|l|size}}</nowiki></code>) to display the file left of the name.
;{{Anchor|Option r}}Option "r"
* <code>r</code> displays the image to the '''<u>r</u>'''ight (has precedence over code <code>l</code>). E.g.<br>{{Tle|t=F|1=Solid green.svg|2=r|3=16|p4=T|4=→ → →}} will show ''rightmost'' {{F|Solid green.svg|r|16|T= → → →}}
;{{Anchor|Option n}} Option "n"
* <code>n</code>: Independent whether the image is displayed or not, the parameter <code>n</code> let display plain text instead of the link. This is sometimes useful for better formatting.
:Note: <code>n</code> can as well be specified with every parameter #4 to #8. When no display of the image is required, <code>n</code> can also be specified with parameter #3; when parameter #2 is not needed for a display text, <code>n</code> can even be specified with parameter #2 (to distinguish a ''text of one character'' from a ''one-character-code'', the text may need to be expanded e.g. with <<nowiki />nowiki/>).<br />{{Tle|t=F|file name|any text|size|b|l|n}} is an example for usage of these formatting characters - the sequence does not matter.
;{{Anchor|Option u}} Option "u"
* <code>u</code>: It would have been nice to have also an option "u" – show the file name below of ("under") the displayed picture. But it seems very difficult to do this in all the different conditions, and the gallery function or the {{T0|G|-|case=l}} is well equipped for that.
;{{Anchor|Option +}} Option "+"
* <code>+</code>: Independent whether the image is displayed or not, the plus sign can be used to prefix the file name display with the namespace.
:No translation occurs, "File:" is used.<br>{{Tle|t=F|Example.svg|+|12}} displays {{F|Example.svg|+|12}}, the name space as a part of the link.
;{{Anchor|Option -}}Option "-"
* <code>-</code>: With the minus sign the name space is not a part of the link:<br>{{Tle|t=F|Example.svg|l|12|-}} displays {{F|Example.svg|l|12|-}}.
:The name space option seems ''misleading and not useful'' with a display name (parameter #2) but it is possible to define it that way:<br>{{Tle|t=F| Example.svg|Test|12|+}} will display {{F|Example.svg|Test|12|+}}
:If as well a <code>+</code> and a <code>-</code> sign are mistakenly defined, the <code>-</code> is ignored.
:<small><u>Note:</u> Some odd combinations of <code>+</code> or <code>-</code> with <code>n</code> are currently not working properly, esp. with <code>n</code> as parameter #3. Use another, better working parameter sequence if so.</small>
;{{Anchor|Option Z}} Option "Z"
* <code>Z</code>: When an image should be displayed ''without showing the file name'', this can be achieved by setting the character "Z". Parameter #1 specifies the file name, parameter #3 the size; therefore <code>Z</code> can be set by either parameter #4 to #8 or the not needed parameter #2. Of course it is of no use to combine <tt>Z</tt> with <tt>n</tt>, <tt>l</tt> or <tt>r</tt> but it won't do any harm.<br />E.g. the sequence<br><code><nowiki>{{F|Rzz 10.svg|Z|10|b}}</nowiki></code><code><nowiki>{{F|Rzz 10.svg|b|16|Z}}</nowiki></code><code><nowiki>{{F|Rzz 10.svg||10|Z|b}}</nowiki></code> will show {{F|Rzz 10.svg|Z|10|b}}{{F|Rzz 10.svg|b|16|Z}}{{F|Rzz 10.svg||10|Z|b}}
;''Examples''
{| class="wikitable"
! Code || style="width:11em"|Result || Note
|-
|{{Tle|t=F}} ||{{0}}{{F}} || without parameter #1: error display & {{C|Commons:Missing file name in template F|categorization}}
|-
|{{Tle|t=F|Yes_check.svg}} || {{F|Yes_check.svg}} || only link
|-
|{{Tle|t=F|Yes check.svg||n}} ||{{F||Yes check.svg|n}} || only name - without link
|-
|{{Tle|t=F|Yes check.svg||16|b}} ||{{F|Yes check.svg|b|16}} || bordered
|-
|{{Tle|t=F|Yes check.svg||16|l}} ||<span>{{F|Yes check.svg|l|16|tt=}}</span> {{0}} || left of name <small>(as in "other versions" of [[:File:Symbol unrelated.svg]].)</small>
|-
|{{Tle|t=F|Yes check.svg||16|n}} ||{{F|Yes check.svg|n|16}} || no link <small>(as in "other versions" of [[:File:Arrow-C.svg]].)</small>
|-
|{{Tle|t=F|Yes check.svg||16|r}} ||{{F|Yes check.svg|r|16}} || rightmost display, with file name
|-
|{{Tle|t=F|Yes check.svg||16|r|Z}} ||{{F|Yes check.svg||16|r|Z}} || rightmost display of image, without file name
|}
''Notes:''
* The ''options'' can as well be written immediately with parameter #2 when no text is passed:
** <code><nowiki>{{F|Yes check.svg||n}}</nowiki></code> is equivalent to <code><nowiki>{{F|Yes check.svg|n}}</nowiki></code>,
** <code><nowiki>{{F|Yes check.svg||16|b}}</nowiki></code> is equivalent to <code><nowiki>{{F|Yes check.svg|b|16}}</nowiki></code>
** <code><nowiki>{{F|Yes check.svg||16|r|Z}}</nowiki></code> is equivalent to <code><nowiki>{{F|Yes check.svg|r|16|Z}}</nowiki></code> and so on.
* Also the sequence does not matter:
** <code><nowiki>{{F|X.jpg||16|b|l|n}}</nowiki></code> is equivalent to <code><nowiki>{{F|X.jpg||16|n|l|b}}</nowiki></code>.
** <code><nowiki>{{F|X.jpg||16|4=b|5=l}}</nowiki></code> is equivalent to <tt><nowiki>{{F|X.jpg||16|4=l|7=b}}</nowiki></tt>
* "b", "n", "l" or "r" may even be coded at the position of parameter #3 when no image size is specified there.
* When it is required to display a text of one character equal to "b", "n", "l", "r", "+", "-", "Z" or a FFL it can be distinguished from such a code by an expansion, e.g. with {{tag|nowiki|s}}.
=== Parameter "t" – Separator{{Anchor|t|Separator}} ===
<code>t=</code>: When the image is displayed either left or right of the displayed file name, with <code>t=</code> any text can be defined to separate the two items. It will replace the default separator <code>:&nbsp;</code> (or <code>&nbsp;</code> with option <tt>l</tt>).
=== Parameter "l" – Interwiki & interlanguage linking{{Anchor|l}} ===
The named parameter <code>l=</code> enables {{w|Help:Interwiki linking|Interwiki}} access and {{w|Help:Interlanguage links|interlanguage}} access.
'''Interwiki links''' or links to sister projects are e.g.
* <code>[[wikt:]]</code> or <code>[[wiktionary:]]</code>
* <code>[[n:]]</code> or <code>[[wikinews:]]</code>
* <code>[[b:]]</code> or <code>[[wikibooks:]]</code>
* <code>[[q:]]</code> or <code>[[wikiquote:]] </code>
* <code>[[s:]]</code> or <code>[[wikisource:]]</code>
'''Interlanguage links''' are via {{w|List of ISO 639-1 codes|ISO 639 codes}}
;''Examples''
* <code>l=b:es</code> for an image of the {{W||Spanish Wikibooks|b:es}}
* <code><nowiki>{{F|Pallot1.svg|l=s:it}}</nowiki></code> {{F|Pallot1.svg|l=s:it}} for an image of in {{W||Italian Wikisource|s:it}}
''Note:''
* Files in any Wikipedia, Wikisource, Wikibooks etc can be addressed, but it is <u>not possible to ''display'' images from outside of Commons</u> due to technical restrictions.
=== Parameter "lang" – SVG language switch{{Anchor|lang}} ===
The named parameter <code>lang=</code> allows to use the ''language switch'' option:<br />
;''Example''
The file {{F|France Population Pyramid-2010.svg}} contains many languages. With <code><nowiki>{{F|France Population Pyramid-2010.svg|Diagram rendered in {{#language:ru|en}}|250|l</nowiki>'''|lang=ru'''<nowiki>|t=<br>}}</nowiki></code>
the translated versions can be shown:<br />
{|
|{{F|France Population Pyramid-2010.svg|Diagram rendered in {{#language:ar|en}}|250|l|lang=ar|t=<br>}}
|{{F|France Population Pyramid-2010.svg|Diagram rendered in {{#language:ja|en}}|250|l|lang=ja|t=<br>}}
|{{F|France Population Pyramid-2010.svg|Diagram rendered in {{#language:ru|en}}|250|l|lang=ru|t=<br>}}
|}
''Note:'' The displayed names are linking to the default language version.
=== Parameter "by" – Author{{Anchor|by|Author}} ===
;''Examples''
{| class="wikitable"
|-
| {{Tle|t=F|Yes check.svg|b|12|p4=by|Gmaxwell}}
| {{F|Yes check.svg|by=Gmaxwell|b|12}}
|-
| {{Tle|t=F|X mark.svg|-|p3=by|<nowiki>{{ut|Anybody||de}} of {{wd}}</nowiki>}}
| {{F|X mark.svg|-|by={{ut|Anybody||de}} of {{wd}}}}
|-
| {{Tle|t=F|#RR.svg|-|22|p4=by|<>nobody}}
| {{F|3RR.svg|by=<>nobody|-|22}}
|-
| {{Tle|t=F|Yes check.svg|/Gmaxwell}}
| {{F|Yes check.svg|/Gmaxwell}}
|}
''Note:''
* Usernames prefixed by either one of <code>& ( . < [ {</code> are displayed-as-they-are without link, and <code>& ( . <</code> doubled, or <code>() <> [] {}</code>, are then removed.
* Instead of the <code><nowiki>by=</nowiki></code> a <code><nowiki>/</nowiki></code> can be enough to specify a user. While {{T0|by|by=}} is used by several templates, the abbreviation "/" is <!-- currently --> only possible with {{T0|F|+}}.
<!--
* With <code>u=c</code>, <code>u=t</code>, <code>u=w</code>, <code>u=wt</code> the [[Template:U/doc#User and user talk links|user link]] can be modified.
-->
=== Parameter "u" – Author modification code{{Anchor|u}} ===
<code>u=</code>: When a user name (e.g. of the creator) is displayed because of the parameter "by", any needed modification of {{T|U}} to either {{T|Ut}}, {{T|Uw}} or {{T|Uwt}} is possible with <code>u=t</code>, <code>u=w</code>, <code>u=wt</code>.
;''Examples''
{| class="wikitable"
|-
| {{Tle|t=F|Yes check.svg|/Gmaxwell|p3=u|t}}
| {{F|Yes check.svg|/Gmaxwell|u=t}}
|-
| {{Tle|T=F|Example.svg|p2=by|Example|p3=u|w}}
| {{F|Example.svg|by=Example|u=w}}
|}
<!--
{{F|Flag of Buddhism.svg|''Buddhist flag''|3=64}} — {{F|Flag of Buddhism.svg|''Buddhist flag''|3=64|4=b|5=l}} (bordered)-->
=== Parameter #9 – File Function Letters{{Anchor|File Function Letters}}===
This option is completely different from the description above, a value is returned instead of displaying something. By invoking the [[Module:File]] various functions can be performed. While parameter #1 specifies the file, the <tt>File Function Letter</tt> must be specified '''only with parameter #2 or #3'''. Such a FFL has precedence, additional parameter settings are ignored.<br />
Except of the mere string operations <tt>F</tt>, <tt>X</tt> and <tt>U</tt>, for files ''outside the commons'' none of the File Functions can be performed.
{| class="wikitable"
|-
! FFL !! function !! returned result !! example code !! result
|-
| {{0}}{{T\|F}} || file name || name without extension [[#descr|<nowiki>{{F|F}}</nowiki>]]
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''F'''}}</code>
| {{F|Flag of Peace (Proposal).PNG|F}}
|-
| rowspan="2"|{{0}}{{T\|X}} || rowspan="2"|extension || rowspan="2"|extension without name
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''X'''}}</code> ''file''
| {{F|Flag of Peace (Proposal).PNG|X}} ''file''
|-
| <code><nowiki>{{uc:{{F|Flag of….PNG|</nowiki>'''X'''}}}}</code> ''file''<br><small>{{0|0}}''Note:'' <code><nowiki>{{uc:}}</nowiki></code> forcing extension to uppercase.</small>
| {{uc:{{F|Flag of Peace (Proposal).PNG|X}}}} ''file''
|-
| {{0}}{{T\|U}} || extension || extension as-it-is, case sensitive
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''U'''}}</code> ''file''
| {{F|Flag of Peace (Proposal).PNG|U}} ''file''
|-
| {{0}}{{T\|I}} || ifexist || "true" if file exists
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''I'''}}</code>
| {{F|Flag of Peace (Proposal).PNG|I}}
|-
| {{0}}{{T\|C}} || count || number of file pages
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''C'''}}</code>
| {{F|Flag of Peace (Proposal).PNG|C}}
|-
| {{0}}{{T\|D}} || date || work date, formatted <small>yyyy-mm-dd</small>
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''D'''}}</code>
| {{F|Flag of Peace (Proposal).PNG|D}}
|-
| {{0}}{{T\|W}} || width || width in pixel
| rowspan="2"|<code><nowiki>{{F|Flag of….PNG|</nowiki>'''W'''}}</code> ×<br><code><nowiki>{{F|Flag of….PNG|</nowiki>'''H'''}}</code> ''pixels''
| rowspan="2"|{{F|Flag of Peace (Proposal).PNG|W}} × {{F|Flag of Peace (Proposal).PNG|H}} ''pixels''
|-
| {{0}}{{T\|H}} || height || height in pixel
|-
| {{0}}{{T\|V}} || valid? || <s>error count from W3C validation</s>
| <s><code><nowiki>{{F|Flag of….PNG|</nowiki>'''V'''}}</code></s>
| <!-- {{F|Flag of Peace (Proposal).PNG|V}} -->
|-
| {{0}}{{T\|S}} || size || file size in bytes
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''S'''}}</code> ''bytes''
| {{F|Flag of Peace (Proposal).PNG|S}} ''bytes''
|-
| {{0}}{{T\|P}} || page size || size of file description page in bytes
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''P'''}}</code> ''bytes''
| {{F|Flag of Peace (Proposal).PNG|P}} ''bytes''
|-
| {{0}}{{T\|G}} || gallery || gallery style display, ''see [[#FFL-G|below]]''
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''G'''}}</code>
| {{F|Flag of Peace (Proposal).PNG|G}}
|}
''Note:''
* {{Anchor|descr}}When a file name is ''enough descriptive'' that it could be used in the file description without alteration, the function <nowiki>{{F|F}}</nowiki> can be used, e.g. <code><nowiki>|description={{en|{{F|F}}.}}</nowiki></code>
* On the other hand it can be a useful abbreviation, to specify the ''own name'' with <code><nowiki>{{F|*}}</nowiki></code> - a short form of <code><nowiki>{{F|{{PAGENAME}}}}</nowiki></code>.
;''Examples''
* <code><nowiki>{{F|Buddhist rainbow flag.svg|Buddhist flag|32|l|t= file name: }} ({{uc:{{F|Buddhist rainbow flag.svg|X}}}} file, nominally {{F|Buddhist rainbow flag.svg|W}} × {{F|Buddhist rainbow flag.svg|H}} pixels, file size: {{F|Buddhist rainbow flag.svg|S}} bytes; description: {{F|Buddhist rainbow flag.svg|P}} bytes.)</nowiki></code> gives the following:
:{{F|Buddhist rainbow flag.svg|Buddhist flag|32|l|t= file name: }} ({{uc:{{F|Buddhist rainbow flag.svg|X}}}} file, nominally {{F|Buddhist rainbow flag.svg|W}} × {{F|Buddhist rainbow flag.svg|H}} pixels, file size: {{F|Buddhist rainbow flag.svg|S}} bytes; description: {{F|Buddhist rainbow flag.svg|P}} bytes.)
* <code><nowiki>''{{subst:F|{{PAGENAME}}|F}}''</nowiki></code> in the description of the above file will give: ''Buddhist rainbow flag''; a short form can be used:
==== File Function Letter "G" – Gallery Style{{Anchor|FFL-G}} ====
With the ''File Function Letter'' "G" a gallery-like display can be achieved. Different possibilities exist:
{| class="wikitable"
|-
|{{Tle|T=F|file name| G }} || like <tt><nowiki><gallery> file name | file name </gallery></nowiki></tt> || centered
|-
|{{Tle|T=F|file name|{{0}} | G }} || like <tt><nowiki><gallery> file name </gallery></nowiki></tt>
|-
|{{Tle|T=F|file name| caption | G }} || like <tt><nowiki><gallery> file name | caption </gallery></nowiki></tt> || centered
|-
|{{Tle|T=F|file name| G | caption}} || like <tt><nowiki><gallery> file name | caption </gallery></nowiki></tt>
|}
The minus sign can be used to display the name space "File:"
{| class="wikitable"
|-
|{{Tle|T=F|file name| G{{0|.}}| - }} || like <tt><nowiki><gallery> file name | File:file name </gallery></nowiki></tt> || centered
|-
|{{Tle|T=F|file name| -{{0|.}}| G }} || like <tt><nowiki><gallery> file name | File:file name </gallery></nowiki></tt>
|}
''Notes:''
* The gallery style function of ''Template:F'' can be useful to display just only one file.
* Display of more files is possible, but it is easier to do with the {{T0|G|gallery template:G}}, where the file names can be separated also with linefeeds, or/and with <code>|</code> (pipes).
;''Examples''
{|class="toptextcells"
|-
! style="width:50%" | with {{T|F|+}}
! style="width:50%" | with {{T|G|+}}
|-
|
<code><nowiki>{{F|Pink check.svg|</nowiki></code><br>
<code><nowiki>Purple check.svg</nowiki></code><br>
<code><nowiki>Yellow check.svg</nowiki></code><br>
<code><nowiki>Red check.svg</nowiki></code><br>
<code><nowiki>|G|16x24}}</nowiki></code>
|
<code><nowiki>{{G|Pink check.svg</nowiki><br>
<nowiki>Purple check.svg</nowiki><br>
<nowiki>Yellow check.svg</nowiki><br>
<nowiki>Red check.svg|d=44}}</nowiki></code>
|-
| {{F|Pink check.svg|
Purple check.svg
Yellow check.svg
Red check.svg
|G|16x24}}
| {{G|Pink check.svg
Purple check.svg
Yellow check.svg
Red check.svg|d=44}}
|-
|colspan="2" style="text-align:center"|another example with caption:
|
|-
|
<code><nowiki>{{F|Pink check.svg|caption 1</nowiki></code><br>
<code><nowiki>Purple check.svg{{!}}capt 2</nowiki></code><br>
<code><nowiki>Yellow check.svg{{!}}capt 3</nowiki></code><br>
<code><nowiki>Red check.svg{{!}}capt 4</nowiki></code><br>
<code><nowiki>|G|32}}</nowiki></code>
|
<code><nowiki>{{G|</nowiki></code><br>
<code><nowiki>Pink check.svg|capt 1</nowiki></code><br>
<code><nowiki>Purple check.svg|capt 2</nowiki></code><br>
<code><nowiki>Yellow check.svg|capt 3</nowiki></code><br>
<code><nowiki>Red check.svg|capt 4|w=32}}</nowiki></code>
|-
|{{F|Pink check.svg|capt 1
Purple check.svg{{!}}capt 2
Yellow check.svg{{!}}capt 3
Red check.svg{{!}}capt 4
|G|32}}
| {{G|
Pink check.svg|capt 1
Purple check.svg|capt 2
Yellow check.svg|capt 3
Red check.svg|capt 4|w=32}}
|}
== See also ==
* [[Template:C]]
* [[:Category:Other versions templates]]
<includeonly>
[[Category:Internal link templates]]
[[Category:Interwiki link templates]]
[[Category:Typing-aid templates]]
[[Category:One-letter templates| ]]
</includeonly>
{{Lua|Module:File|Module:Galeria}}
{{TemplateBox
| 1 = 1
| 1label = File Name
| 1d-en = [[#File Name|Name of the file]], with or without namespace; [[#Asterisk|or <code>*</code>]]<br>underscores contained in the filename are replaced by spaces.
| 1d-td-en = Name of the file, with or without namespace; or “*”. Underscores contained in the filename are replaced by spaces.
| 1stat = required
| 1type = wiki-file-name
| 2 = 2
| 2label = Display Name
| 2d-en = [[#Display Name|Any text]], default is the file name (parameter #1). If there is no alternate text the parameter #2 instead can hold the first [[#option|option]].
| 2d-td-en = Any text. If there is no alternate text parameter #2 instead can hold the first "option".
| 2default = ''File Name''
| 2default-td = The file name (parameter #1).
| 2stat = optional-
| 2type = line
| 3 = 3
| 3label = Image size
| 3d-en = Numeric value for the [[#Image size|image size]]. The picture is displayed inline in this size
| 3d-td-en = The picture is displayed inline in this size.
| 3stat = optional-
| 3type = number
| 4 = 4
| 4label = ''Option''
| 4d = [[#Option b|Option: '''b''']] (lowercase B) to draw a '''''b'''order'' around the displayed picture
| 4d-td = <nowiki/>
; b (lowercase B)
: Draw a border around the displayed picture
<nowiki/>
| 4sv = b
| 4stat = optional-
| 4type = string
| 5 = 5
| 5label = ''Option''
| 5d = [[#Option l|Option: '''l''']] (lowercase L) to display the image <i>'''l'''eft</i> of the file name<br>[[#Option r|Option: '''r''']] (lowercase R) to display the image to the '''''r'''ightmost''
| 5d-td = <nowiki/>
; l (lowercase L)
: Display the image to the left of the file name
; r (lowercase R)
: Display the image to the right of the file name
<nowiki/>
| 5sv = l/r
<nowiki/>
| 5stat = optional-
| 5type = string
| 6 = 6
| 6label = ''Option''
| 6d = [[#Option n|Option: '''n''']] (lowercase N) to display the name '''''n'''ot-linking'' to the file
| 6d-td = <nowiki/>
; n (lowercase N)
: Display the name not-linking to the file
<nowiki/>
| 6sv = n
| 6stat = optional-
| 6type = string
| 7 = 7
| 7label = ''Option''
| 7d = [[#Option +|Option: '''+''']] to display the namespace prefix “File:” as part of the link<br>[[#Option -|Option: '''-''']] to not display the prefix “File:” as part of the link
| 7d-td = <nowiki/>
; +
: Display the namespace prefix “File:” as part of the link
; -
: Display the namespace prefix “File:” outside the link
<nowiki/>
| 7sv = +/-
| 7stat = optional-
| 7type = string
| 8 = 8
| 8label = ''Option''
| 8d = [[#Option Z|Option: '''Z''']] (uppercase Z) to suppress the display of the file name
| 8d-td = <nowiki/>
; Z (uppercase Z)
: Suppress the display of the file name
<nowiki/>
| 8sv = Z
| 8stat = optional-
| 8type = string
| 9 = 9
| 9label = File Function Letter
| 9d = Different functions can be performed, see [[#File Function Letters|File Function Letters]].
| 9d-td = Different functions can be performed.
| 9stat = optional-
| 9type = string
| 10 = t
| 10label = Separator
| 10d = The [[#Separator|separator]] can be any text string, used between displayed file name and displayed image<br />
Use uppercase <code>T=</code> to precede the string with a space
| 10d-td = Used between the displayed file name and displayed image.
Use uppercase “T=” to precede the string with a space.
| 10def = &nbsp;
| 10def-td =
| 10stat = optional-
| 10type = line
| 11 = p
| 11label = Prefix
| 11d = a prefix to be written in advance; e.g. <code><nowiki>p=<br/></nowiki></code> for a new line
| 11d-td = A prefix to be written in advance; e.g. “p={{^(}}br/{{)^}}” for a new line
| 11stat = optional-
| 11type = line
| 12 = l
| 12label = Interwiki & interlanguage link
| 12d = For {{w|Help:Interlanguage links|interlanguage linking}} with {{w|List of ISO 639-1 codes|ISO 639 codes}} if the file is in another Wikipedia and for {{w|Help:Interwiki linking|Interwiki linking}} if the file is in a Wikimedia sister project, see [[#l|parameter "l"]].
| 12d-td = For interlanguage linking with ISO 639 codes if the file is in another Wikipedia and for Interwiki linking if the file is in a Wikimedia sister project.
| 12stat = optional-
| 12type = string
| 13 = lang
| 13label = SVG language switch
| 13d = language code ({{W|ISO 639-1|ISO 639}}), to display a translated version when the SVG file [[Commons:Translation possible/Learn more#Multiple translations within one SVG file|contains translations]] using SVG {{tag|switch|o}} elements, see [[#lang|Parameter "lang"]].
| 13d-td = language code (ISO 639), to display a translated version when the SVG file contains translations using SVG {{^(}}switch{{)^}} elements.
| 13stat = optional-
| 13type = string
| 14 = link
| 14label = Link
| 14d = enables to link to somewhere else
| 14stat = optional-
| 14type = wiki-page-name
<!--
| 15 = text
| 15label = Trailing text
| 15d = trailing text, e.g. in a file list
| 15stat = optional-
| 15type = wiki-page-name
-->
| 16 = by
| 16label = Author
| 16d = can be used to display the user who created the file, see [[#Author|parameter "by"]]
| 16d-td = can be used to display the user who created the file
| 16stat = optional-
| 16type = wiki-user-name
| 19 = u
| 19label = Author modification code
| 19d = modification of the "by"-user, e.g. <code>t</code>, <code>w</code>, <code>wt</code>,<br>see [[#u|parameter "u"]]
| 19d-td = modification of the "by"-user, e.g. "u=t", "u=w" or "u=wt"
| 19stat = optional-
| 19type = code
| name = F
| desc-td = Establishes a link to the file whose name is given in parameter #1 and displays the name without the prefix "File:".
|desc=<big>Establishes a link to the file whose name is given in parameter #1 and displays the name without the prefix "File:".</big><br />
* {{nobold|Instead of the file name, any text given in parameter #2 can be displayed.}}
* {{nobold|The file itself (the image) can be displayed at any size inline, after the name.}}
:''For more details go to [[#Standard usage|standard usage]].''
Additional possibilities:
* {{nobold|It is possible to display the image left of the name to allow better text alignment when arranging in several lines, ''see [[#Option l|Option "l"]]''}}
*{{nobold|It is possible to avoid the link and display the plain name of parameter #1 (or parameter #2), ''see [[#Option n|Option "n"]]''.}}
*{{nobold|It is possible to avoid any display of the name but display the image, ''see [[#Option Z|Option "Z"]]''.}}
*{{nobold|The displayed image can be surrounded by a border, ''see [[#Option b|Option "b"]]''.}}
:''For more details go to [[#Extended usage|extended usage]].''
|namespace=all
|usergroup=all
|i18n-method=-
|i18n-desc=<!--The template does not generate any localizable text.-->
|usage-notes=
|seealso=
Some templates using {{T2|F}} can display an <u>unlimited number</u> of files, names and/or images, with possibly other display names and many other modifying parameters:
* {{tle|T=File|…}} – displays horizontally an unlimited number of files, after the internationalized text "File:"
* {{tle|T=Filelist|…}} – displays horizontally an unlimited number of files: {{Tle|t=Filelist|1=filename 1|2=filename 2|3=filename 3|4= … }}
* {{tle|T=Other versions}} – to display vertically an unlimited number of files, e.g. in the <code>Other versions=</code> field
* {{tle|T=Derived from|…}} – displays vertically, after text
* {{tle|T=Derivative versions|…}} – displays vertically, after text
| useTemplateData = 1
}}
== Standard usage ==
{{Anchor|File Name}}'''Parameter #1''' (File Name) is the only parameter which is required. It can only hold the filename; with or without "File:" – the displayed file name is in both cases without "File:". Underscores ("_") contained in the filename are replaced by spaces.
{{Anchor|Display Name}}'''Parameter #2''' (Display Name) can hold an alternate text (instead of the file name) which can only be passed with this parameter. Underscores ("_") contained in the display name are displayed. If there is no given alternate text parameter #2 can instead hold the first [[#option|option]].
{{Anchor|Image size}}'''Parameter #3''' (Image size) can hold the displayed image size which can only be passed with this parameter. By default the image is displayed right of the file name. This could be changed with [[#option l|option "l"]]. Formats for the image size are e.g. <code>96</code> or <code>x64</code> or <code>60x16</code>. It is '''''not possible''''' to display images of other Wikipedias - only when the files are stored in the Commons!
;'''''Examples'''''
{| class="wikitable"
! Syntax || Code || Result || Note
|-
| {{Tle|t=F|file name}} || <nowiki>{{F|SVG_Simple_Icon.svg}}</nowiki><br><nowiki>{{F|File:SVG_Simple_Icon.svg}}</nowiki>|| {{F|SVG_Simple_Icon.svg}} ||is the simplest form; it displays the file name as a link to the file.
|-
| {{Tle|t=F|file name|any text}}|| <nowiki>{{F|SVG_Simple_Icon.svg|example}}</nowiki> || {{F|SVG_Simple_Icon.svg|example}} || displays the text string of the 2{{exp|nd}} parameter as a link to the file.
|-
| {{Tle|t=F|file name||size}}|| <nowiki>{{F|SVG_Simple_Icon.svg||16}}</nowiki> || {{F|SVG_Simple_Icon.svg||16}} || displays first the file name, and then the image with a [[#Image size|size in px]].
|-
| {{Tle|t=F|file name|any text|size}} || <nowiki>{{F|SVG_Simple_Icon.svg|SVG|16x16}}</nowiki> || {{F|SVG_Simple_Icon.svg|SVG|16x16}} || is the same but ''any text'' is displayed instead of the file name.
|} {{Anchor|Asterisk}}
''Note:''
* When parameter #1 contains an asterisk (the value * ) instead of the file name, that will be replaced by the <tt><nowiki>{{PAGENAME}}</nowiki></tt>; this is possible only in the <tt>file</tt> namespace.
== Extended usage ==
=== Parameters #4 to #8 – Options{{Anchor|Options}} ===
In comparison to parameters #1, #2 and #3 the “options” (b, n, l, r, +, -, Z) are not fixed to a parameter position. Anyone of them can be passed/specified in any sequence with every '''parameter #4 to #8''' (or '''even #2''' when no text is passed). There are the following options:
;{{Anchor|Option b}}Option "b"
* <code>b</code> draws a '''<u>b</u>'''order around the image. This can be useful to show the extensions of the image.
;{{Anchor|Option l}}Option "l"
* <code>l</code> displays the image <u>'''l'''</u>eft of the name. This option allows a better formatting, e.g. when more files are displayed in a list and the file names are of different length:<br />{{Tle|t=F|file name|<nowiki />|size|l}} (or <code><nowiki>{{F|file name|l|size}}</nowiki></code>) to display the file left of the name.
;{{Anchor|Option r}}Option "r"
* <code>r</code> displays the image to the '''<u>r</u>'''ight (has precedence over code <code>l</code>). E.g.<br>{{Tle|t=F|1=Solid green.svg|2=r|3=16|p4=T|4=→ → →}} will show ''rightmost'' {{F|Solid green.svg|r|16|T= → → →}}
;{{Anchor|Option n}} Option "n"
* <code>n</code>: Independent whether the image is displayed or not, the parameter <code>n</code> let display plain text instead of the link. This is sometimes useful for better formatting.
:Note: <code>n</code> can as well be specified with every parameter #4 to #8. When no display of the image is required, <code>n</code> can also be specified with parameter #3; when parameter #2 is not needed for a display text, <code>n</code> can even be specified with parameter #2 (to distinguish a ''text of one character'' from a ''one-character-code'', the text may need to be expanded e.g. with <<nowiki />nowiki/>).<br />{{Tle|t=F|file name|any text|size|b|l|n}} is an example for usage of these formatting characters - the sequence does not matter.
;{{Anchor|Option u}} Option "u"
* <code>u</code>: It would have been nice to have also an option "u" – show the file name below of ("under") the displayed picture. But it seems very difficult to do this in all the different conditions, and the gallery function or the {{T0|G|-|case=l}} is well equipped for that.
;{{Anchor|Option +}} Option "+"
* <code>+</code>: Independent whether the image is displayed or not, the plus sign can be used to prefix the file name display with the namespace.
:No translation occurs, "File:" is used.<br>{{Tle|t=F|Example.svg|+|12}} displays {{F|Example.svg|+|12}}, the name space as a part of the link.
;{{Anchor|Option -}}Option "-"
* <code>-</code>: With the minus sign the name space is not a part of the link:<br>{{Tle|t=F|Example.svg|l|12|-}} displays {{F|Example.svg|l|12|-}}.
:The name space option seems ''misleading and not useful'' with a display name (parameter #2) but it is possible to define it that way:<br>{{Tle|t=F| Example.svg|Test|12|+}} will display {{F|Example.svg|Test|12|+}}
:If as well a <code>+</code> and a <code>-</code> sign are mistakenly defined, the <code>-</code> is ignored.
:<small><u>Note:</u> Some odd combinations of <code>+</code> or <code>-</code> with <code>n</code> are currently not working properly, esp. with <code>n</code> as parameter #3. Use another, better working parameter sequence if so.</small>
;{{Anchor|Option Z}} Option "Z"
* <code>Z</code>: When an image should be displayed ''without showing the file name'', this can be achieved by setting the character "Z". Parameter #1 specifies the file name, parameter #3 the size; therefore <code>Z</code> can be set by either parameter #4 to #8 or the not needed parameter #2. Of course it is of no use to combine <tt>Z</tt> with <tt>n</tt>, <tt>l</tt> or <tt>r</tt> but it won't do any harm.<br />E.g. the sequence<br><code><nowiki>{{F|Rzz 10.svg|Z|10|b}}</nowiki></code><code><nowiki>{{F|Rzz 10.svg|b|16|Z}}</nowiki></code><code><nowiki>{{F|Rzz 10.svg||10|Z|b}}</nowiki></code> will show {{F|Rzz 10.svg|Z|10|b}}{{F|Rzz 10.svg|b|16|Z}}{{F|Rzz 10.svg||10|Z|b}}
;''Examples''
{| class="wikitable"
! Code || style="width:11em"|Result || Note
|-
|{{Tle|t=F}} ||{{0}}{{F}} || without parameter #1: error display & {{C|Commons:Missing file name in template F|categorization}}
|-
|{{Tle|t=F|Yes_check.svg}} || {{F|Yes_check.svg}} || only link
|-
|{{Tle|t=F|Yes check.svg||n}} ||{{F||Yes check.svg|n}} || only name - without link
|-
|{{Tle|t=F|Yes check.svg||16|b}} ||{{F|Yes check.svg|b|16}} || bordered
|-
|{{Tle|t=F|Yes check.svg||16|l}} ||<span>{{F|Yes check.svg|l|16|tt=}}</span> {{0}} || left of name <small>(as in "other versions" of [[:File:Symbol unrelated.svg]].)</small>
|-
|{{Tle|t=F|Yes check.svg||16|n}} ||{{F|Yes check.svg|n|16}} || no link <small>(as in "other versions" of [[:File:Arrow-C.svg]].)</small>
|-
|{{Tle|t=F|Yes check.svg||16|r}} ||{{F|Yes check.svg|r|16}} || rightmost display, with file name
|-
|{{Tle|t=F|Yes check.svg||16|r|Z}} ||{{F|Yes check.svg||16|r|Z}} || rightmost display of image, without file name
|}
''Notes:''
* The ''options'' can as well be written immediately with parameter #2 when no text is passed:
** <code><nowiki>{{F|Yes check.svg||n}}</nowiki></code> is equivalent to <code><nowiki>{{F|Yes check.svg|n}}</nowiki></code>,
** <code><nowiki>{{F|Yes check.svg||16|b}}</nowiki></code> is equivalent to <code><nowiki>{{F|Yes check.svg|b|16}}</nowiki></code>
** <code><nowiki>{{F|Yes check.svg||16|r|Z}}</nowiki></code> is equivalent to <code><nowiki>{{F|Yes check.svg|r|16|Z}}</nowiki></code> and so on.
* Also the sequence does not matter:
** <code><nowiki>{{F|X.jpg||16|b|l|n}}</nowiki></code> is equivalent to <code><nowiki>{{F|X.jpg||16|n|l|b}}</nowiki></code>.
** <code><nowiki>{{F|X.jpg||16|4=b|5=l}}</nowiki></code> is equivalent to <tt><nowiki>{{F|X.jpg||16|4=l|7=b}}</nowiki></tt>
* "b", "n", "l" or "r" may even be coded at the position of parameter #3 when no image size is specified there.
* When it is required to display a text of one character equal to "b", "n", "l", "r", "+", "-", "Z" or a FFL it can be distinguished from such a code by an expansion, e.g. with {{tag|nowiki|s}}.
=== Parameter "t" – Separator{{Anchor|t|Separator}} ===
<code>t=</code>: When the image is displayed either left or right of the displayed file name, with <code>t=</code> any text can be defined to separate the two items. It will replace the default separator <code>:&nbsp;</code> (or <code>&nbsp;</code> with option <tt>l</tt>).
=== Parameter "l" – Interwiki & interlanguage linking{{Anchor|l}} ===
The named parameter <code>l=</code> enables {{w|Help:Interwiki linking|Interwiki}} access and {{w|Help:Interlanguage links|interlanguage}} access.
'''Interwiki links''' or links to sister projects are e.g.
* <code>[[wikt:]]</code> or <code>[[wiktionary:]]</code>
* <code>[[n:]]</code> or <code>[[wikinews:]]</code>
* <code>[[b:]]</code> or <code>[[wikibooks:]]</code>
* <code>[[q:]]</code> or <code>[[wikiquote:]] </code>
* <code>[[s:]]</code> or <code>[[wikisource:]]</code>
'''Interlanguage links''' are via {{w|List of ISO 639-1 codes|ISO 639 codes}}
;''Examples''
* <code>l=b:es</code> for an image of the {{W||Spanish Wikibooks|b:es}}
* <code><nowiki>{{F|Pallot1.svg|l=s:it}}</nowiki></code> {{F|Pallot1.svg|l=s:it}} for an image of in {{W||Italian Wikisource|s:it}}
''Note:''
* Files in any Wikipedia, Wikisource, Wikibooks etc can be addressed, but it is <u>not possible to ''display'' images from outside of Commons</u> due to technical restrictions.
=== Parameter "lang" – SVG language switch{{Anchor|lang}} ===
The named parameter <code>lang=</code> allows to use the ''language switch'' option:<br />
;''Example''
The file {{F|France Population Pyramid-2010.svg}} contains many languages. With <code><nowiki>{{F|France Population Pyramid-2010.svg|Diagram rendered in {{#language:ru|en}}|250|l</nowiki>'''|lang=ru'''<nowiki>|t=<br>}}</nowiki></code>
the translated versions can be shown:<br />
{|
|{{F|France Population Pyramid-2010.svg|Diagram rendered in {{#language:ar|en}}|250|l|lang=ar|t=<br>}}
|{{F|France Population Pyramid-2010.svg|Diagram rendered in {{#language:ja|en}}|250|l|lang=ja|t=<br>}}
|{{F|France Population Pyramid-2010.svg|Diagram rendered in {{#language:ru|en}}|250|l|lang=ru|t=<br>}}
|}
''Note:'' The displayed names are linking to the default language version.
=== Parameter "by" – Author{{Anchor|by|Author}} ===
;''Examples''
{| class="wikitable"
|-
| {{Tle|t=F|Yes check.svg|b|12|p4=by|Gmaxwell}}
| {{F|Yes check.svg|by=Gmaxwell|b|12}}
|-
| {{Tle|t=F|X mark.svg|-|p3=by|<nowiki>{{ut|Anybody||de}} of {{wd}}</nowiki>}}
| {{F|X mark.svg|-|by={{ut|Anybody||de}} of {{wd}}}}
|-
| {{Tle|t=F|#RR.svg|-|22|p4=by|<>nobody}}
| {{F|3RR.svg|by=<>nobody|-|22}}
|-
| {{Tle|t=F|Yes check.svg|/Gmaxwell}}
| {{F|Yes check.svg|/Gmaxwell}}
|}
''Note:''
* Usernames prefixed by either one of <code>& ( . < [ {</code> are displayed-as-they-are without link, and <code>& ( . <</code> doubled, or <code>() <> [] {}</code>, are then removed.
* Instead of the <code><nowiki>by=</nowiki></code> a <code><nowiki>/</nowiki></code> can be enough to specify a user. While {{T0|by|by=}} is used by several templates, the abbreviation "/" is <!-- currently --> only possible with {{T0|F|+}}.
<!--
* With <code>u=c</code>, <code>u=t</code>, <code>u=w</code>, <code>u=wt</code> the [[Template:U/doc#User and user talk links|user link]] can be modified.
-->
=== Parameter "u" – Author modification code{{Anchor|u}} ===
<code>u=</code>: When a user name (e.g. of the creator) is displayed because of the parameter "by", any needed modification of {{T|U}} to either {{T|Ut}}, {{T|Uw}} or {{T|Uwt}} is possible with <code>u=t</code>, <code>u=w</code>, <code>u=wt</code>.
;''Examples''
{| class="wikitable"
|-
| {{Tle|t=F|Yes check.svg|/Gmaxwell|p3=u|t}}
| {{F|Yes check.svg|/Gmaxwell|u=t}}
|-
| {{Tle|T=F|Example.svg|p2=by|Example|p3=u|w}}
| {{F|Example.svg|by=Example|u=w}}
|}
<!--
{{F|Flag of Buddhism.svg|''Buddhist flag''|3=64}} — {{F|Flag of Buddhism.svg|''Buddhist flag''|3=64|4=b|5=l}} (bordered)-->
=== Parameter #9 – File Function Letters{{Anchor|File Function Letters}}===
This option is completely different from the description above, a value is returned instead of displaying something. By invoking the [[Module:File]] various functions can be performed. While parameter #1 specifies the file, the <tt>File Function Letter</tt> must be specified '''only with parameter #2 or #3'''. Such a FFL has precedence, additional parameter settings are ignored.<br />
Except of the mere string operations <tt>F</tt>, <tt>X</tt> and <tt>U</tt>, for files ''outside the commons'' none of the File Functions can be performed.
{| class="wikitable"
|-
! FFL !! function !! returned result !! example code !! result
|-
| {{0}}{{T\|F}} || file name || name without extension [[#descr|<nowiki>{{F|F}}</nowiki>]]
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''F'''}}</code>
| {{F|Flag of Peace (Proposal).PNG|F}}
|-
| rowspan="2"|{{0}}{{T\|X}} || rowspan="2"|extension || rowspan="2"|extension without name
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''X'''}}</code> ''file''
| {{F|Flag of Peace (Proposal).PNG|X}} ''file''
|-
| <code><nowiki>{{uc:{{F|Flag of….PNG|</nowiki>'''X'''}}}}</code> ''file''<br><small>{{0|0}}''Note:'' <code><nowiki>{{uc:}}</nowiki></code> forcing extension to uppercase.</small>
| {{uc:{{F|Flag of Peace (Proposal).PNG|X}}}} ''file''
|-
| {{0}}{{T\|U}} || extension || extension as-it-is, case sensitive
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''U'''}}</code> ''file''
| {{F|Flag of Peace (Proposal).PNG|U}} ''file''
|-
| {{0}}{{T\|I}} || ifexist || "true" if file exists
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''I'''}}</code>
| {{F|Flag of Peace (Proposal).PNG|I}}
|-
| {{0}}{{T\|C}} || count || number of file pages
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''C'''}}</code>
| {{F|Flag of Peace (Proposal).PNG|C}}
|-
| {{0}}{{T\|D}} || date || work date, formatted <small>yyyy-mm-dd</small>
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''D'''}}</code>
| {{F|Flag of Peace (Proposal).PNG|D}}
|-
| {{0}}{{T\|W}} || width || width in pixel
| rowspan="2"|<code><nowiki>{{F|Flag of….PNG|</nowiki>'''W'''}}</code> ×<br><code><nowiki>{{F|Flag of….PNG|</nowiki>'''H'''}}</code> ''pixels''
| rowspan="2"|{{F|Flag of Peace (Proposal).PNG|W}} × {{F|Flag of Peace (Proposal).PNG|H}} ''pixels''
|-
| {{0}}{{T\|H}} || height || height in pixel
|-
| {{0}}{{T\|V}} || valid? || <s>error count from W3C validation</s>
| <s><code><nowiki>{{F|Flag of….PNG|</nowiki>'''V'''}}</code></s>
| <!-- {{F|Flag of Peace (Proposal).PNG|V}} -->
|-
| {{0}}{{T\|S}} || size || file size in bytes
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''S'''}}</code> ''bytes''
| {{F|Flag of Peace (Proposal).PNG|S}} ''bytes''
|-
| {{0}}{{T\|P}} || page size || size of file description page in bytes
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''P'''}}</code> ''bytes''
| {{F|Flag of Peace (Proposal).PNG|P}} ''bytes''
|-
| {{0}}{{T\|G}} || gallery || gallery style display, ''see [[#FFL-G|below]]''
| <code><nowiki>{{F|Flag of….PNG|</nowiki>'''G'''}}</code>
| {{F|Flag of Peace (Proposal).PNG|G}}
|}
''Note:''
* {{Anchor|descr}}When a file name is ''enough descriptive'' that it could be used in the file description without alteration, the function <nowiki>{{F|F}}</nowiki> can be used, e.g. <code><nowiki>|description={{en|{{F|F}}.}}</nowiki></code>
* On the other hand it can be a useful abbreviation, to specify the ''own name'' with <code><nowiki>{{F|*}}</nowiki></code> - a short form of <code><nowiki>{{F|{{PAGENAME}}}}</nowiki></code>.
;''Examples''
* <code><nowiki>{{F|Buddhist rainbow flag.svg|Buddhist flag|32|l|t= file name: }} ({{uc:{{F|Buddhist rainbow flag.svg|X}}}} file, nominally {{F|Buddhist rainbow flag.svg|W}} × {{F|Buddhist rainbow flag.svg|H}} pixels, file size: {{F|Buddhist rainbow flag.svg|S}} bytes; description: {{F|Buddhist rainbow flag.svg|P}} bytes.)</nowiki></code> gives the following:
:{{F|Buddhist rainbow flag.svg|Buddhist flag|32|l|t= file name: }} ({{uc:{{F|Buddhist rainbow flag.svg|X}}}} file, nominally {{F|Buddhist rainbow flag.svg|W}} × {{F|Buddhist rainbow flag.svg|H}} pixels, file size: {{F|Buddhist rainbow flag.svg|S}} bytes; description: {{F|Buddhist rainbow flag.svg|P}} bytes.)
* <code><nowiki>''{{subst:F|{{PAGENAME}}|F}}''</nowiki></code> in the description of the above file will give: ''Buddhist rainbow flag''; a short form can be used:
==== File Function Letter "G" – Gallery Style{{Anchor|FFL-G}} ====
With the ''File Function Letter'' "G" a gallery-like display can be achieved. Different possibilities exist:
{| class="wikitable"
|-
|{{Tle|T=F|file name| G }} || like <tt><nowiki><gallery> file name | file name </gallery></nowiki></tt> || centered
|-
|{{Tle|T=F|file name|{{0}} | G }} || like <tt><nowiki><gallery> file name </gallery></nowiki></tt>
|-
|{{Tle|T=F|file name| caption | G }} || like <tt><nowiki><gallery> file name | caption </gallery></nowiki></tt> || centered
|-
|{{Tle|T=F|file name| G | caption}} || like <tt><nowiki><gallery> file name | caption </gallery></nowiki></tt>
|}
The minus sign can be used to display the name space "File:"
{| class="wikitable"
|-
|{{Tle|T=F|file name| G{{0|.}}| - }} || like <tt><nowiki><gallery> file name | File:file name </gallery></nowiki></tt> || centered
|-
|{{Tle|T=F|file name| -{{0|.}}| G }} || like <tt><nowiki><gallery> file name | File:file name </gallery></nowiki></tt>
|}
''Notes:''
* The gallery style function of ''Template:F'' can be useful to display just only one file.
* Display of more files is possible, but it is easier to do with the {{T0|G|gallery template:G}}, where the file names can be separated also with linefeeds, or/and with <code>|</code> (pipes).
;''Examples''
{|class="toptextcells"
|-
! style="width:50%" | with {{T|F|+}}
! style="width:50%" | with {{T|G|+}}
|-
|
<code><nowiki>{{F|Pink check.svg|</nowiki></code><br>
<code><nowiki>Purple check.svg</nowiki></code><br>
<code><nowiki>Yellow check.svg</nowiki></code><br>
<code><nowiki>Red check.svg</nowiki></code><br>
<code><nowiki>|G|16x24}}</nowiki></code>
|
<code><nowiki>{{G|Pink check.svg</nowiki><br>
<nowiki>Purple check.svg</nowiki><br>
<nowiki>Yellow check.svg</nowiki><br>
<nowiki>Red check.svg|d=44}}</nowiki></code>
|-
| {{F|Pink check.svg|
Purple check.svg
Yellow check.svg
Red check.svg
|G|16x24}}
| {{G|Pink check.svg
Purple check.svg
Yellow check.svg
Red check.svg|d=44}}
|-
|colspan="2" style="text-align:center"|another example with caption:
|
|-
|
<code><nowiki>{{F|Pink check.svg|caption 1</nowiki></code><br>
<code><nowiki>Purple check.svg{{!}}capt 2</nowiki></code><br>
<code><nowiki>Yellow check.svg{{!}}capt 3</nowiki></code><br>
<code><nowiki>Red check.svg{{!}}capt 4</nowiki></code><br>
<code><nowiki>|G|32}}</nowiki></code>
|
<code><nowiki>{{G|</nowiki></code><br>
<code><nowiki>Pink check.svg|capt 1</nowiki></code><br>
<code><nowiki>Purple check.svg|capt 2</nowiki></code><br>
<code><nowiki>Yellow check.svg|capt 3</nowiki></code><br>
<code><nowiki>Red check.svg|capt 4|w=32}}</nowiki></code>
|-
|{{F|Pink check.svg|capt 1
Purple check.svg{{!}}capt 2
Yellow check.svg{{!}}capt 3
Red check.svg{{!}}capt 4
|G|32}}
| {{G|
Pink check.svg|capt 1
Purple check.svg|capt 2
Yellow check.svg|capt 3
Red check.svg|capt 4|w=32}}
|}
== See also ==
* [[Template:C]]
* [[:Category:Other versions templates]]
<includeonly>
[[Category:Internal link templates]]
[[Category:Interwiki link templates]]
[[Category:Typing-aid templates]]
[[Category:One-letter templates| ]]
</includeonly>