This template generates a link to an entry in a given language. It links to a specific language-section on the target page, and applies language-specific formatting. It can also show a number of annotations after the linked term.
There are several linking templates:
{{link}} (shortcut{{l}}). Use this template outside running text, in sections that list entries, such as “Synonyms”, “Related terms”, and “Descendants”.{{mention}} (shortcut{{m}}). Use this template when a particular term ismentioned (notused) within running English text, particularly in “Etymology” and “Usage notes” sections, and occasionally in definitions.{{l-self}}. Use this template in inflection tables and other templates that list multiple terms. It works the same as{{link}}, but when it links to the same page it is placed on, the link turns bold rather than becoming a link. This mimics the MediaWiki software's behaviour when linking to the same page, but has the full language support of{{link}}.{{m-self}}. Use this template in templates that mention multiple terms in running text. It displays like{{mention}}, but works the same as{{l-self}} when linked to the current page.{{ll}}. This template creates a link, but does not add any additional formatting or annotations. There is at the moment no consensus on whether it should be used in entries or not.All of these templates create a link to a language's section of an entry, or to a language-specific sense id created by the template{{senseid}} if the|id= parameter is used.
If the second parameter of{{l}},{{m}},{{l-self}}, or{{m-self}} contains a wikilink ([[entryname|text]] or[[entryname]]), then this link will be transformed into a link to the language's section of the entry. For instance,the [[word]] will be transformed intothe [[word#English|word]] andthese [[word|words]] will be transformed intothese [[word#English|words]], if the language code supplied to the template isen.
The annotations – transliteration, translation, literal translation, and part of speech – are displayed by{{l}},{{m}},{{l-self}}, or{{m-self}} in parentheses after the link.{{ll}} does not support any of these annotations.
See alsoWiktionary:Style guide#Styling templates for a list of all the various styling templates with examples.
This template usesModule:links as a back-end, so it supports all the features and bugs of that module. Please see its documentation for more details.
The template takes one required positional parameter and several optional parameters. Note that either the second or third positional parameter should be given, although technically neither is required.
|1= (required)|2= (optional)entry_name setting inModule:languages, but will keep them in the displayed text.* in front of this parameter.^ before the corresponding character in the term. For example,{{l|zh|^西方}} gives西方(Xīfāng). Please note that this should be used instead of giving a capitalised manual transliteration.Unsupported titles/ prefix: for instance,{{m|mul|:}} →: links toUnsupported titles/Colon. This feature is made possible by the list found atModule:links/data. To add new unsupported titles, follow the directions in the module.|3= (optional)|t= or|4= (optional)|gloss= is deprecated for this purpose.|sc= (optional)None will be used.|tr= (optional)tr=- if you don't want a transliteration to be automatically generated (you shouldn't really ever do this in an entry).|ts= (optional)|pos= (optional)|g=,|g2=,|g3= and so on(optional)|lit= (optional)|id= (optional){{senseid}} template.|accel-form= (optional)|, use{{!}} instead.|accel-translit= (optional)|accel-form= above. The value of this parameter goes into param|tr= of the call to{{head}} in the accelerated entry. You only need to specify this for languages that use a non-Latin script, and only when the auto-generated transliteration is insufficient, incorrect or nonexistent.|accel-lemma= (optional)|accel-form= above. The value of this parameter goes into param|2= of the call to{{inflection of}} in the accelerated entry. It defaults to the name of the current page, and only needs to be specified when the lemma contains additional diacritics that are stripped in order to generate the pagename (as in Latin, Russian, Ancient Greek, Old English, etc.).|accel-lemma-translit= (optional)|accel-form= above. The value of this parameter goes into param|tr= of the call to{{inflection of}} in the accelerated entry. You only need to specify this for languages that use a non-Latin script, and only when the auto-generated transliteration is insufficient, incorrect or nonexistent.|accel-gender= (optional)|accel-form= above. The value of this parameter goes into param|g= of the call to{{head}} in the accelerated entry. You should only rarely specify this.|accel-nostore=1Simple usage:
{{l|cs|háček}}<spanclass="Latn"lang="cs">[[háček#Czech|háček]]</span>Showing alternative text:
{{l|en|go|went}}<spanclass="Latn"lang="en">[[go#English|went]]</span>With wikilinks in input:
{{l|en|[[God]] be [[with]] [[you]]}}<spanclass="Latn"lang="en">[[God#English|God]] be [[with#English|with]] [[you#English|you]]</span>Removal of diacritics:
{{l|la|exemplī grātiā}}<spanclass="Latn"lang="la">[[exempli gratia#Latin|exemplī grātiā]]</span>Reconstructed words:
{{l|ine-pro|*bʰréh₂tēr}}<spanclass="Latn"lang="ine-pro">[[Reconstruction:Proto-Indo-European/bʰréh₂tēr|*bʰréh₂tēr]]</span>Translation:
{{l|la|similis|t=like}} or{{l|la|similis||like}}<spanclass="Latn"lang="la">[[:similis#Latin|similis]]</span><spanclass="mention-gloss-paren annotation-paren">(</span><spanclass="mention-gloss-double-quote">“</span><spanclass="mention-gloss">like</span><spanclass="mention-gloss-double-quote">”</span><spanclass="mention-gloss-paren annotation-paren">)</span>Miscellaneous / with many options:
{{l|ru|ру́сский||Russian|g=m}}<spanclass="Cyrl"lang="ru">[[русский#Russian|ру́сский]]</span> <spanclass="gender"><abbrtitle="masculine gender">m</abbr></span><spanclass="mention-gloss-paren">(</span><spanlang=""class="tr">rússkij</span>,<spanclass="mention-gloss-double-quote">“</span><spanclass="mention-gloss">Russian</span><spanclass="mention-gloss-double-quote">”</span><spanclass="mention-gloss-paren">)</span>Use of accelerators (in an inflection-table entry):
{{l-self|ang|{{{dat_pl_f}}}|accel-form=dat{{!}}f{{!}}p|accel-lemma={{{nom_sg_m}}}}}<spanclass="Latn form-of lang-ang dat|f|p-form-of origin-{{{nomsgm}}} "lang="ang">[[:Unsupported titles/`lcub``lcub``lcub`dat`lowbar`pl`lowbar`f`rcub``rcub``rcub`#Old_English|{{{dat_pl_f}}}]]</span>{{l}},{{m}},{{l-self}}, or{{m-self}} all add HTML tags in addition to creating a link.{{l|en|word}} outputs the wikicode<spanclass="Latn"lang="en">[[word#English|word]]</span>, and{{m|en|word}} outputs<iclass="Latn mention"lang="en">[[word#English|word]]</i>.{{l-self}} and{{m-self}} do the same, except they don't create a link if the page being linked to is the same as the current page. This HTML is applied byModule:script utilities; for more, seeModule:script utilities/documentation#tag text.
The outcome ofWiktionary:Votes/2007-10/style for mentioned terms determined the default style for terms mentioned with the{{mention}}/{{m}} template. The preliminary default for Latin-script (i.e. Roman script, not just Latin-language) terms and phrases is italics. Readers can easily toggle the output from italics to bold by selecting “Show other Latin (Roman) script mentions in bold” fromWT:PREFS. Alternatively, or for more advanced customization, readers can add styles to their style sheets as described inWT:CUSTOM:
.mention-Latn { font-style: normal }.mention-Latn { font-weight: bold; font-style: normal }.mention-Latn { font-style: italic }Further, the default style of the subsequent English translation glosses is in double quotes (pending a vote to approve this template). Readers can easily change the output to single quotes by selecting “Show English glosses for mentioned terms in single quotes” fromWT:PREFS.
{{m+}} – to create a link like{{m}} but with the language name{{user}} – for mentioningusers{{mention-gloss}} ({{m-g}}) – to create quotation marks (for glosses or translations) that are formatted with the same HTML code as used by{{link}} or{{mention}}{{zh-l}} – a similar template specialized for Chinese{{ltc-l}} – a similar template specialized for Middle Chinese{{ja-l}} – a similar template specialized for Japanese{{ko-l}} – a similar template specialized for Korean{{fa-l}} – a similar template specialized for Persian{{th-l}} – a similar template specialized for Thai{{vi-l}} – a similar template specialized for Vietnamese{{section link}} – to link to a section of a pageThere are high performance versions of this template for several languages. All of them take two parameters: the word and the alternative text. Some may support transliteration also, but they should not support any other parameters for speed reasons. Using any of these subtemplates is sometimes necessary for pages that have many links, since they are faster. For normal use, there is no need for this, and the regular{{l}} should be used instead.
TemplateData for mention
This template generates a link to an entry in a given language. It links to a specific language-section on the target page, and applies language-specific formatting. It can also show a number of annotations after the linked term.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| language code | 1 | The language code (see Wiktionary:Languages) for the language that the term is in. All languages are supported, including constructed and reconstructed ones.
| String | required |
| entry to link | 2 | The page name to be linked to
| Page name | required |
| displayed text | 3 | Alternative text to display as the link title, if different from the page name | String | suggested |
| gloss | 4tgloss | A gloss or short translation of the term | String | suggested |
| literal translation | lit | A literal translation of the term | String | optional |
| sense ID | id | A sense ID for the term, which links to anchors on the page set by the {{senseid}} template.
| String | optional |
| script code | sc | (optional) The script code (see [[Wiktionary:Scripts]]) for the script that the term is written in. The template can usually figure this out itself, so this is rarely needed. When no code is given, the template will try to detect the script based on the characters of the word, and if it fails to detect the script, the code <code>None</code> will be used.
| String | optional |
| part of speech | pos | A part of speech indication for the term
| String | suggested |
| transliteration | tr | Transliteration for non-Latin-script words. When no transliteration is given, the template will try to add a default transliteration when possible. For certain languages, automated transliteration will override the value of this parameter. Use <code>tr=-</code> if you don't want a transliteration to be automatically generated (you shouldn't really ever do this in an entry). | String | suggested |
| gender and number | g | Gender and number; see [[Module:gender and number]] for details. | String | optional |