Module:tl-headword/documentation

From Wiktionary, the free dictionary
Archived revision by WingerBot (talk | contribs) as of 06:44, 6 March 2024.
Jump to navigation Jump to search
Documentation for Module:tl-headword. [edit]
This page contains usage information, categories, interwiki links and other content describing the module.

This module is used for Tagalog headword-line templates. This module implements {{tl-noun}}, {{tl-proper noun}}, {{tl-verb}}, {{tl-adj}}, {{tl-adv}}, {{tl-num}} (for numerals), {{tl-prep}} (for prepositions) and {{tl-pron}} (for pronouns) and {{tl-head}} (for other parts of speech). See the documentation of those templates for more information.

The module is always invoked the same way, by passing a single parameter to the "show" function. This parameter is the name of the part of speech, but in plural (examples given are for nouns, and for adjective forms respectively):

{{#invoke:tl-headword|show|nouns}}
{{#invoke:tl-headword|show|adjective forms}}

If the part of speech is omitted, the template being implemented must have the part of speech (in its singular form, e.g. interjection) specified in |1=. This is used to support {{tl-head}}.

The template will, by default, accept the following parameters (specific parts of speech may accept or require others):

|1=, |head2=, |head3=, ...
Override the headword display; used to add accents to the headword and/or links to individual words in a multiword term. Use the value + to explicitly request the default (which is the same as the page name). Note that it no longer works to specify a blank parameter to request the default; you must use +. Note also that if the invoking template is {{tl-head}}, parameter |1= is instead the part of speech (in its singular form, e.g. interjection), and |2= is the first explicit headword.
|b=, |b2=, |b3=, ...
Specify the corresponding Baybayin-script spelling of a Latin-script term. The value can be either the actual Baybayin spelling or the Latin-script equivalent. The value + is equivalent to specifying the page name.
|tr=, |tr2=, |tr3=, ...
Override the default transliteration, if the page name is in the Baybayin script rather than the Latin script. |tr= corresponds to |1=, |tr2= to |head2=, |tr3= to |head3=, etc. Rarely necessary.
|id=
Sense ID for linking to this headword. See {{senseid}} for more information.
|nolink=1 or |nolinkhead=1
Don't link individual words in the headword of a multiword term. Useful for foreign or otherwise unanalyzable terms, where the expression functions as a whole in Tagalog but the individual parts are not Tagalog words.
|suffix=1
Indicate that a term is a suffix even if it doesn't begin with a hyphen. Useful for Baybayin-script suffixes. See #Suffix handling below.
|nosuffix=1
Prevent terms beginning with a hyphen from being interpreted as suffixes. See #Suffix handling below.
|addlpos=
Comma-separated list of additional parts of speech that suffix can form. See #Suffix handling below.
|pagename=
Override the page name used to compute default values of various sorts. Useful when testing, for documentation pages, etc.

Suffix handling

If the term begins with a hyphen (-), it is assumed to be a suffix rather than a base form, and is categorized into Category:Tagalog suffixes and Category:Tagalog POS-forming suffixes rather than Category:Tagalog POSs (e.g. Category:Tagalog noun-forming suffixes rather than Category:Tagalog nouns). This behavior can also be obtained for terms not beginning with a hyphen using |suffix=1, and can be prevented using |nosuffix=1. If the suffix can form multiple parts of speech and it is not desirable to use separate headers for these (e.g. for alternative forms), use |addlpos= to specify the additional parts of speech (comma-separated).