Template:head/documentation: Difference between revisions
TheNightAvl (talk | contribs) |
TheNightAvl (talk | contribs) Tag: Manual revert |
||
(3 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
For example, on the Radestrian entry {{m|rad|alșa}}: | For example, on the Radestrian entry {{m|rad|alșa}}: | ||
{{tempn|head|rad|noun|g=in|genitive singular|alșesk}} | {{tempn|head|rad|noun|g=in|genitive singular|alșesk|label=count and uncount}} | ||
Generates: | Generates: | ||
: {{head|rad|noun|g=in|genitive singular|alșesk|head=alșa|nocat=1}} | : {{head|rad|noun|g=in|genitive singular|alșesk|head=alșa|nocat=1|label=count and uncount}} | ||
=== Overriding the headword === | === Overriding the headword === | ||
Line 24: | Line 24: | ||
: {{head|rad|noun|g=in|genitive singular|pýj vỉșk|head={{l|rad|pýr}} {{l|rad|vỉș|vỉșe}}|nocat=1}} | : {{head|rad|noun|g=in|genitive singular|pýj vỉșk|head={{l|rad|pýr}} {{l|rad|vỉș|vỉșe}}|nocat=1}} | ||
==== <code>*word:link*</code> functionality ==== | |||
Instead of typing out links, you can also use <code>*asterisks*</code> around the words to be linked. <code>*word*</code> generates a simple language link, but <code>*word:link*</code> will create a link displaying <code>word</code> and linking to <code>link</code>. | Instead of typing out links, you can also use <code>*asterisks*</code> around the words to be linked. <code>*word*</code> generates a simple language link, but <code>*word:link*</code> will create a link displaying <code>word</code> and linking to <code>link</code>. | ||
Line 32: | Line 32: | ||
Generates the same as above. | Generates the same as above. | ||
==== <code>*word[s]*</code> functionality ==== | |||
If you find yourself repeating stems when typing <code>*words:word*</code>, you can instead type <code>*word[s]*</code>, which will be treated as if it were <code>*words:word*</code>. | If you find yourself repeating stems when typing <code>*words:word*</code>, you can instead type <code>*word[s]*</code>, which will be treated as if it were <code>*words:word*</code>. | ||
Latest revision as of 01:21, 28 April 2024
Uses Lua: |
This is a base implementation of the headword part of a dictionary entry.
It is recommended that instead of using this directly, you make a custom template for a language that is better suited to the inflections of the language. For example, whilst this template could very well be used for a Kilitic adjective, there is a specific template {{kil-adj}}
.
Usage
For example, on the Radestrian entry alșa:
{{head|rad|noun|genitive singular|alșesk|g=in|label=count and uncount}}
Generates:
- alșa inan (countable and uncountable, genitive singular alșesk)
Overriding the headword
The parameter |head=
will override the headword. This is useful if you want to manually link words in multiword entries which would otherwise be incorrect from the auto-splitter, or if there is a capitalisation mismatch. This also applies in derived templates, such as {{rad-noun}}
.
For example, on the Radestrian entry pýr vỉșe:
{{head|rad|noun|genitive singular|pýj vỉșk|head={{l|rad|pýr}} {{l|rad|vỉș|vỉșe}}|g=in}} or {{rad-noun|in|head={{l|rad|pýr}} {{l|rad|vỉș|vỉșe}}|gen=pýj vỉșk}}
Generates:
*word:link*
functionality
Instead of typing out links, you can also use *asterisks*
around the words to be linked. *word*
generates a simple language link, but *word:link*
will create a link displaying word
and linking to link
.
{{head|rad|noun|genitive singular|pýj vỉșk|head=*pýr* *vỉșe:vỉș*|g=in}} or {{rad-noun|in|head=*pýr* *vỉșe:vỉș*|gen=pýj vỉșk}}
Generates the same as above.
*word[s]*
functionality
If you find yourself repeating stems when typing *words:word*
, you can instead type *word[s]*
, which will be treated as if it were *words:word*
.
{{head|rad|noun|genitive singular|pýj vỉșk|head=*pýr* *vỉș[e]*|g=in}} or {{rad-noun|in|head=*pýr* *vỉș[e]*|gen=pýj vỉșk}}
Generates the same as above.