Template:affix/documentation: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
(Created page with "This template shows the morphemes that make up a word, for use in etymology sections. Although it is called affix, it can be used for compounds too. ==Usage== All you need to do is provide the language code and then as many constituent morphemes as you like. From {{tempn|affix|kil|le-|šēnhē}}. Generates the following: From {{affix|kil|le-|šēnhē|t2=write|nocat=1}}. ===Parameters=== ; {{para|1|req=1}} : Specifies the language code of the language that the etymo...")
 
No edit summary
Line 22: Line 22:
; {{para|d<var>N</var>}}
; {{para|d<var>N</var>}}
: Specifies the text to be shown in place of the word itself for one of the constituent morphemes, as specified by the number <var>N</var>. For example {{para|d2|abcd}} would set the displayed text in the link of the second constituent element to "abcd".
: Specifies the text to be shown in place of the word itself for one of the constituent morphemes, as specified by the number <var>N</var>. For example {{para|d2|abcd}} would set the displayed text in the link of the second constituent element to "abcd".
; {{para|l<var>N</var>}}
: Specifies the language code of the constituent morpheme, as specified by the number <var>N</var>. If this is given, the language name appears and a derivation category may be added.


; {{para|pos<var>N</pos>}}
; {{para|pos<var>N</pos>}}
: Specifies the part of speech to be shown for one of the constituent morphemes, as specified by the number <var>N</var>.
: Specifies the part of speech to be shown for one of the constituent morphemes, as specified by the number <var>N</var>.
; {{para|nocat}}
: When provided with any value, e.g {{para|nocat|1}}, stops the template from adding any categories to the page.
===Categories===
This template automatically adds derivation-related categories to the page according to the constituent morphemes given, unless the {{para|nocat}} parameter is set.
If prefixes (ending with a "-" or "·"), suffixes (beginning with a "-" or "·") or infixes (both beginning and ending with a "-" or "·") are detected, corresponding categories will be added.
For example, the following snippet would add the category "Kilitic terms prefixed with le-".
{{tempn|affix|kil|le-|šēnhē}}
If there are no affixes found, but there are at least 2 constituent parts then it will be considered a compound and a category such as "Kilitic compound terms" will be added.
If one of the constituent morphemes is a different language (as specified by one of the {{para|l<var>N</var>}} parameters) then a category such as "Kilitic terms derived from Other Language" will be added.