Template:mention

Definition from Wiktionary, the free dictionary
Jump to: navigation, search

term


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 in sections that list entries, such as “Synonyms”, “Related terms”, and “Descendants”, or in running text when a word is being used. If a term is being mentioned, use {{mention}} instead.
  • {{mention}} (shortcut {{m}}). This template italicizes a word if the word is in a Latin script. Use this template to mention (as in the use–mention distinction) a term or phrase within running text (for example, in ===Etymology=== and ====Usage notes==== sections).
  • {{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.

See also Wiktionary:Style guide#Styling_templates for a list of all the various styling templates with examples.

This template uses Module:links as a back-end, so it supports all the features of that module. Please see its documentation for more details.

Parameters[edit]

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=
The language code (see Wiktionary:Languages) for the language that the term is in. All languages are supported, including constructed and reconstructed ones.
2=
(optional) The page name to be linked to. The template will automatically remove diacritics and punctuation from the page title, according to the entry_name setting in Module:languages, but will keep them in the displayed text. To link to a reconstructed term, such as Proto-Germanic *dagaz, add * in front of this parameter.
3=
(optional) Alternate text to display as the link title, if different from the page name. Please do not use this only for adding diacritics or punctuation to the word, as the template can automatically remove these. See above.
t=
(optional) A gloss or short translation of the word. The parameters 4= and gloss= are deprecated for this purpose.
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 None will be used.
tr=
(optional) 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 tr=- if you don't want a transliteration to be automatically generated (you shouldn't really ever do this in an entry).
pos=
(optional) A part of speech indication for the term.
g=, g2=, g3= and so on
(optional) Gender and number; see Module:gender and number for details.
lit=
(optional) A literal translation for the term.
id=
(optional) A sense id for the term, which links to anchors on the page set by the {{senseid}} template.

Examples[edit]

Simple usage:

{{l|cs|háček}}
háček

Showing alternative text:

{{l|en|go|went}}
went

With wikilinks in input:

{{l|en|[[God]] be [[with]] [[you]]}}
God be with you

Reconstructed words:

{{l|ine-pro|*bʰréh₂tēr}}
*bʰréh₂tēr

Miscellaneous / with many options:

{{l|ru|ру́сский||Russian|g=m}}
ру́сский m(rússkij, Russian)

Customization[edit]

The outcome of Wiktionary: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” from WT:PREFS. Alternatively, or for more advanced customization, readers can add styles to their style sheets as described in WT:CUSTOM:

  • For plain format (e.g.: From mot + ...):
    .mention-Latn { font-style: normal }
  • For bold format (e.g.: From mot + ...):
    .mention-Latn { font-weight: bold; font-style: normal }
  • For italicized format (e.g.: From mot + ...):
    .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” from WT:PREFS.

See also[edit]

  • {{ja-l}} - a similar template specialized for Japanese
  • {{ko-l}} - a similar template specialized for Korean
  • {{vi-l}} - a similar template specialized for Vietnamese

Language-specific subtemplates[edit]

There are high performance versions of this template for several languages. All of them take two parameters: the word and the alternate 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[edit]

This is the TemplateData documentation for this template used by VisualEditor and other tools.

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.

Template parameters

This template has custom formatting.

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.

Default
empty
Example
en
Auto value
empty
String required
page name 2

The page name to be linked to.

Default
empty
Example
house
Auto value
empty
Page suggested
alternate text 3

(optional) Alternate text to display as the link title, if different from the page name.

Default
empty
Example
empty
Auto value
empty
String suggested
gloss 4tgloss

A gloss or short translation of the word.

Default
empty
Example
empty
Auto value
empty
String suggested
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 None will be used.

Default
empty
Example
Latn
Auto value
empty
String optional
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 tr=- if you don't want a transliteration to be automatically generated (you shouldn't really ever do this in an entry).

Default
empty
Example
empty
Auto value
empty
String suggested
part of speech pos

A part of speech indication for the term

Default
empty
Example
noun
Auto value
empty
String suggested
gender and number g

Gender and number; see [[Module:gender and number]] for details.

Default
empty
Example
empty
Auto value
empty
String suggested
literal translation lit

A literal translation for the term.

Default
empty
Example
empty
Auto value
empty
String optional
sense id id

A sense id for the term, which links to anchors on the page set by the {{senseid}} template.

Default
empty
Example
empty
Auto value
empty
String suggested

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.

Template parameters

This template has custom formatting.

Parameter Description Type Status
language code 1The language code (see [[Wiktionary:Languages]]) for the language that the term is in.

no description

Default
empty
Example
en
Auto value
empty
String required
term 2

The page name to be linked to.

Default
empty
Example
example
Auto value
empty
Page optional
alternate text 3

Alternate text to display as the link title, if different from the page name. Please do not use this only for adding diacritics or punctuation to the word, as the template can automatically remove these.

Default
empty
Example
empty
Auto value
empty
String optional
T t

A gloss or short translation of the word.

Default
empty
Example
empty
Auto value
empty
String optional
Lit lit

A literal translation for the term.

Default
empty
Example
empty
Auto value
empty
Unknown optional
sense id id

A sense id for the term, which links to anchors on the page set by the {{senseid}} template.

Default
empty
Example
house
Auto value
empty
String optional