This template is used to create a basic headword line. This is the line of text that comes between the part-of-speech header (like ===Noun===
) and the actual definitions of the word.
Note that most invocations of {{head}}
should be fairly simple. If a language requires a relatively complex call to {{head}}
for many words (such as the same set of inflected forms in many entries, or using sort=
in every entry), the language should probably have its own templates. Templates made specifically for a given language can be more sophisticated, and can handle inflections and other grammatical issues that are specific to that language. They can also make use of the capabilities of Lua modules. For this reason, keep in mind that the usage examples given on this page are for illustrative purposes only. Most of the languages given in the examples here already have their own sets of templates, such as {{en-verb}}
, {{ja-noun}}
, {{zh-noun}}
, {{la-verb}}
and so on.
However, {{head}}
can be used for words for which the basic usage (two or three parameters) is enough, or for languages that do not yet have their own templates. If you know how to make your own templates, it's recommended that you create some for the language you intend to work in before creating new entries, rather than using this template (and then having to replace it with a language-specific template later).
A short reference of all parameters.
|1=
|sc=
|2=
invariable
list at the top of Module:headword/data if necessary.|head=
and |head2=
, |head3=
...|tr=
and |tr2=
, |tr3=
...|g=
and |g2=
, |g3=
...|cat2=
, |cat3=
, |cat4=
|2=
, these should always be in the plural.|noposcat=1
|2=
. Normally, two categories are added, one based on the part of speech given (e.g. Category:Sanskrit nouns) and one based on the type of the part of speech, either lemma or non-lemma form (e.g. Category:Sanskrit lemmas). Specifying |noposcat=1
will suppress both categories.|nogendercat=1
|nomultiwordcat=1
|nopalindromecat=1
|nopalindromecat=1
disables this categorization.|sccat=1
|sc=
or autodetected based on the value specified to |head=
or the page name. This category is useful for languages that can be written in multiple scripts.|autotrinfl=1
|3=
, |4=
and further parameters (see below). This can also be set for individual inflected forms using |fNautotr=
.|sort=
|3=
, |4=
and further{{head|language|category|name 1|form 1|name 2|form 2|name 3|form 3|...}}
. If multiple forms exist for the same name, separate them by using "or
" as the name. Forms work the same as the 2nd parameter of {{l}}
, and can thus have embedded wikilinks, will have certain diacritics removed, and so on.N
replaced by the number of the form:
|fNalt=
{{l}}
.|fNtr=
|tr=
parameter of {{l}}
.|fNsc=
|sc=
.|fNid=
|fNg=
|g=
.|fNqual=
{{qualifier}}
does. This is used to mark certain forms as archaic, rare or similar.or
"), these parameters should use the number of the first form. They are automatically applied to all forms following that name.
|fNaccel-form=
|
, use {{!}}
instead.|fNaccel-translit=
|fNaccel-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.|fNaccel-lemma=
|fNaccel-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.).|fNaccel-lemma-translit=
|fNaccel-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.|fNaccel-gender=
|fNaccel-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.|fNaccel-nostore=1
|fNnolink=1
|fNrequest=1
|fNautotr=1
The basic usage is:
{{head|lang|part of speech}}
The first parameter is the language code (see Wiktionary:Languages), which is required in all cases. The second is the part of speech. For example on van:
{{head|nl|preposition}}
which produces
The part of speech is used to add a category to the page. So, the above code would also add the page to Category:Dutch prepositions.
The part of speech (second parameter) can be either singular or plural, and written out fully (e.g. interjection
) or abbreviated (e.g. int
or intj
). If the part of speech is written out in full, it is stylistically preferred to write it in the singular.
The following part of speech aliases (abbreviations) are recognized by the module.
Alias | Canonical form |
---|---|
a |
adjective
|
adj |
adjective
|
adv |
adverb
|
art |
article
|
cnum |
cardinal number
|
conj |
conjunction
|
conv |
converb
|
det |
determiner
|
int |
interjection
|
interj |
interjection
|
intj |
interjection
|
n |
noun
|
num |
numeral
|
onum |
ordinal number
|
part |
participle
|
pcl |
particle
|
phr |
phrase
|
pn |
proper noun
|
postp |
postposition
|
pre |
preposition
|
prep |
preposition
|
pro |
pronoun
|
pron |
pronoun
|
prop |
proper noun
|
proper |
proper noun
|
rom |
romanization
|
v |
verb
|
vb |
verb
|
vi |
intransitive verb
|
vt |
transitive verb
|
vti |
transitive and intransitive verb
|
Normally, the displayed headword is the same as the name of the current page. The parameter |head=
can be used to specify a different headword to display. This can be useful if additional accent marks should be placed on the word, that are not present in the normal written form that is given in the page's name. For example, the Latin word scribo is normally written that way, but is also spelled scrībō in its fully accented form. For such a case, you would specify |head=scrībō
.
Another purpose of this parameter is for terms that consist of multiple words. The |head=
parameter can be used to link to the individual words that the term is made up of. For example, for the English phrasal verb give up, you could use:
Note in the above example that the template automatically adds the correct language section to the links in the same way as {{l}}
. So the links actually come out as if written ] ]
. This means that you should not add such section links yourself, nor should you use {{l}}
inside the |head=
parameter. These were necessary in the past, but they can now be safely removed.
In a few cases it may be necessary to show more than one headword. For example, a language like Russian might have a word with a single written form, but multiple alternative ways of placing the accent marks (compare this to English kílometer and kilómeter). Additional headwords can be displayed using the parameters |head2=
, |head3=
and so on.
If a term is written in a script other than the Latin alphabet, a transliteration of the term into the Latin alphabet should be provided using the |tr=
parameter. Every language generally has its own rules for writing transliterations on Wiktionary; check with the language's "About" page (such as Wiktionary:About Russian) for more information.
The template can automatically transliterate words in many languages; this is controlled through special transliteration modules such as Module:el-translit (and also the data in Module:languages). This means that for those languages, a transliteration does not need to be provided, as it can be generated internally. If the |head=
parameter was provided, it is used as the base for the transliteration instead, so that any additional accents are also included in the transliteration. Use |tr=-
if you don't want a transliteration to be automatically generated (you shouldn't really ever do this in an entry).
The template has a set of parameters to display gender, number, noun class or other kinds of grammatical property. These are used and displayed in the standard format required by Module:gender and number.
The gender is given with the optional |g=
parameter. If more than one specification is necessary, you can also use |g2=
, |g3=
and so on. If you know that a gender is needed, but don't know what it is, specify |g=?
, which will add the page to a cleanup category. You can also specify a partial gender. For example, if you know that a word is plural but don't know if it's, say, masculine or feminine plural, you can specify |g=?-p
.
Further optional parameters are available to display inflections or other closely related forms of the word. These are given pair-wise: the first of each pair gives a label for the inflection, and the second then gives the actual term.
For example, in the Sandbox:
{{head|en|noun|plural|Sandboxes|irregular plural|Sandboxen}}
Certain diacritics are automatically removed from the term when creating the link, just like {{l}}
and {{term}}
do. So you don't need to worry about removing them yourself. A Latin example, where macrons are removed automatically:
{{head|la|noun|g=m|genitive|nīdī}}
If you want to display multiple alternative forms of an inflection, you can use or
as the label separating them. The template will recognise this and omit the comma:
The term (second part of a pair) may be blank. This can be used to add a simple note, such as "uncountable" or "intransitive":
{{head|en|noun|countable and uncountable||plural|milks}}
If the label is blank, but the term is not, it acts as if the term was not specified either and omits both. This is not very useful in entries, but it can be a very powerful feature when writing templates using {{head}}
as a base.
You can specify alternative display form, script, sense id and gender for each form with the parameters |fNalt=
, |fNsc=
, |fNid=
and |fNg=
, with "N" replaced with the number of the form. Some examples:
{{head|sh|noun|head=tȇlo|g=n|Cyrillic spelling|те̑ло|f1sc=Cyrl}}
{{head|de|noun|g=m|genitive|Hundes|or|Hunds|plural|Hunde|diminutive|Hündchen|f4g=n}}
{{head|ja|noun|uncountable||hiragana|せいじ|romaji|seiji|f3sc=Latn}}
{{head|cmn|noun|traditional and simplified||Pinyin|zhèngzhì|f2sc=Latn}}
When using {{head}}
as a base to create other templates, the class for accelerated links (WT:ACCEL) can be added with |fNaccel-form=
. See Module:headword for more information on how to use this. If the label is or
, the corresponding acceleration is ignored, and it is "inherited" from the preceding form. Examples:
An inflection term can contain wikilinks as part of the parameter, like the |head=
parameter as well as the {{l}}
template. Language sections will be added to the individual links:
{{head|en|adjective|comparative|] broken|superlative|] broken}}
Naturally, you should only use this to display a single form that consists of multiple words. You should not use this to specify multiple alternative forms; use the or
label for this instead.
There are a few more parameters available for categories:
|sort=
specifies a category sort key. This is rarely needed, as by default, a sort key will be generated for the language according to the rules defined for that language in Module:languages (the sort_key
setting). For languages that have no sort key rules defined yet, the default sort key is the name of the page, with any hyphens removed from the beginning of the name.|cat2=
, |cat3=
and , |cat4=
specify additional category names that the page should be added to. The language's name is added in front, so if you use {{head|en|verb|cat2=irregular verbs}}
, the page will be added to both Category:English verbs and Category:English irregular verbs. Note that this parameter must be given in plural, unlike the part-of-speech parameter!The optional parameter |sc=
gives the script code (see Wiktionary:Scripts). The script can usually be detected automatically based on the possibilities listed for the language in Module:languages, so this parameter is only needed in rare cases. The example below is thus only for illustrative purposes; a real example would not need |sc=
here.
An example, for the entry море, one might use:
{{head|sh|noun|sc=Cyrl|g=n}}
This template is used to create a basic headword line. This is the line of text that comes between the part-of-speech header (like <code>===Noun===</code>) and the actual definitions of the word.
Parameter | Description | Type | Status | |
---|---|---|---|---|
language code | 1 | The language code. See ]. | Line | required |
part of speech | 2 | The part of speech category which is used to add the entry to the appropriate category. This can be in either plural or singular form. In the latter case, the template will pluralise it automatically if it doesn't already end in ''-s''. Exceptions can be added to the <code>invariable</code> list at the top of ] if necessary.
| String | optional |
script code | sc | The script code. See ]. This is rarely needed as the script can generally be automatically detected. | Unknown | optional |
script code with category | cat sc | The same as {{para|sc}}, but this also adds "in (name) script" to the category specified by the second parameter below. This is used to subcategorise words in different scripts, if languages can be written in more than one script. If both {{para|sc}} and {{para|cat sc}} are provided, the latter takes precedence. | String | optional |
part of speech category 2 | cat2 | Additional part-of-speech categories. Unlike the <code>part of speech</code>, these should always be in plural. | String | optional |
part of speech category 3 | cat3 | Additional part-of-speech categories. Unlike the <code>part of speech</code>, these should always be in plural. | String | optional |
sort key | sort | The sort key to use when placing the entry in the above categories. This is rarely needed, as the default generated sort key is usually correct. | String | optional |
head | head | Overrides the headword that is displayed. This is used primarily to add diacritical marks or to link to individual words in a multi-word term. By default, if the page name has spaces in it, the words are split across the spaces, which is usually correct but may need overriding. Additional parameters are available if more than one headword needs to be shown. | String | optional |
head2 | head2 | Additional term for the headword display. | String | optional |
head3 | head3 | Additional term for the headword display. | String | optional |
head4 | head4 | Additional term for the headword display. | String | optional |
head5 | head5 | Additional term for the headword display. | String | optional |
tr | tr | Provides the transiteration for the term, see ]. For many languages, this can be generated automatically so this does not need to be specified, but some entries cannot be reliably transliterated automatically (e.g. Arabic) so this parameter is necessary then. | String | optional |
tr2 | tr2 | Provides the transiteration for the term, should match <code>head2</code>. | String | optional |
tr3 | tr3 | Provides the transiteration for the term, should match <code>head3</code>. | String | optional |
tr4 | tr4 | Provides the transiteration for the term, should match <code>head4</code>. | String | optional |
tr5 | tr5 | Provides the transiteration for the term, should match <code>head5</code>. | String | optional |
g | g | Provides gender specifications for the word, if necessary. See ] for the format used. | String | optional |
g2 | g2 | Provides gender specifications for the word, if necessary, should match <code>head2</code>. | String | optional |
g3 | g3 | Provides gender specifications for the word, if necessary, should match <code>head3</code>. | String | optional |
g4 | g4 | Provides gender specifications for the word, if necessary, should match <code>head4</code>. | String | optional |
g5 | g5 | Provides gender specifications for the word, if necessary, should match <code>head5</code>. | String | optional |
name of form 1 | 3 | The name of a first of form of a term. | String | optional |
form 1 | 4 | A first form of the term. | String | optional |