Wiktionary:Inline modifiers
Inline modifiers are a method of specifying properties of individual term parameters (and certain other types of parameters, such as gender and number specifications) used by many templates on Wiktionary. They are used particularly when a given template has multiple such parameters.
The general syntax is as in e.g. |eq=Изабе́лла<tr:Izabɛ́lla><t:Isabelle>, which specifies a term, in this case the Russian name Изабе́лла (Izabɛ́lla, “Isabelle”), and contains two inline modifiers, <tr:Izabɛ́lla> (specify a manual transliteration) and <t:Isabelle> (specifying a gloss, i.e. translation). As shown, the inline modifier is set off using angle brackets <...>, and within the angle bracket pair is a modifier prefix (specifying the type of property) and a modifier value (specifying the value of the property). As in this example, multiple inline modifiers can be attached to a given term, and there is no inherent limit as to how many modifiers can be attached to a term. Nested angle brackets inside the term (e.g. in HTML tags) are correctly handled as long as they are balanced. To include a single (i.e. unmatched) literal greater-than or less-than sign inside of angle brackets, use either the HTML entity syntax > and < or the equivalent templates {{)^}} and {{^(}}.
Most of the time, only one instance of a given modifier prefix can be attached to a given term, and an error results if you write e.g. |eq=Изабе́лла<tr:Izabɛ́lla><tr:Isabelle>. This helps catch typos, as in this case where <tr:...> is accidentally used in place of <t:...>.
It is common for parameters to allow multiple comma-separated values to be supplied (generally no space is allowed after the comma, or it will be interpeted as an embedded comma part of the value rather than a delimiter). In this case, each value can take its own inline modifiers. An example of this is (for the German initialism mfG:
{{init of|de|mit freundlichen Grüßen<t:with friendly greetings>,mit freundlichem Gruß<t:with friendly greeting>}}
Here there are two possible expansions of the initialism, and a gloss (translation) is supplied for each. This displays as follows:
- initialism of mit freundlichen Grüßen (“with friendly greetings”) or mit freundlichem Gruß (“with friendly greeting”)
Occasionally, other types of syntax are supported than the standard <prefix:value> syntax. For example, {{desc}} supports Boolean modifiers that contain only a prefix, such as <inh> (indicating an inherited term) and <slb> (indicating a semi-learned borrowing).
The particular modifier prefixes supported for a given parameter depend on the template and parameter in question, but generally the following prefixes are found:
Label, qualifier and reference modifiers
[edit]Most parameters with inline modifiers allow label, qualifier and reference modifiers to provide explanatory text for the parameter. (These are the only modifiers supported by gender/number specifications, for example.) These are:
l: comma-separated left labels, e.g.<l:rare>or<l:UK,Australia>or<l:archaic,or,dialectal>- These are the same set of labels as is supported by
{{lb}}, and are used for the same purposes, e.g. specifying usage restrictions. See the documentation of{{lb}}for the full set of recognized labels, but keep in mind that any text can be supplied, and unrecognized labels are displayed as-is. - As shown, there must not be a space after the comma for it to be recognized as a delimiter.
- The labels appear before the term, parenthesized, italicized and appropriately linked as if
{{lb}}were used (but without categorization). - An alternative syntax is to enclose the labels in
<<...>>, e.g.<l:<<rare>>, <<archaic>> or <<dialectal>>>or<l:similarly <<common>> but <<nonstandard>> and <<proscribed>>>. - There are other syntactic features; see
{{lb}}for a full description.
- These are the same set of labels as is supported by
ll: comma-separated right labels; these appear after the term, parenthesized, italicized and appropriately linked as for left labels, and use the same syntax- There are no set rules for whether and how to use left vs. right labels and qualifiers. Generally, it makes more sense to use a left label or qualifier to modify the second of two comma-separated terms to emphasize that only that term is affected, but otherwise it depends on what looks better, which is a subjective choice.
q: left qualifier; this appears before the term, parenthesized and italicized- Qualifiers are always displayed as-is, unlinked (unless links are explicitly given in the qualifier), and should be used for one-off explanatory notes.
- Examples of qualifiers are
<q:neither sexual nor romantic in nature>(when giving a translation of the English word love in a language that distinguishes platonic love from romantic love) or<q:in the meaning “utterance”>(in reference to the plural of German Wort, which varies depending on its meaning).
qq: right qualifier; this appears after the term, parenthesized and italicizedref: reference or references, using the syntax documented in Template:IPA#References- To specify multiple references, you can either include multiple
<ref:...>inline modifiers or separate the references with!!!within a single inline modifier.
- To specify multiple references, you can either include multiple
Link modifiers
[edit]Parameters that specify terms other than inflections usually allow inline modifiers corresponding to all the parameters of link templates such as {{l}} and {{m}}. In particular:
t: gloss (translation)tr: transliterationts: transcription, for languages where the transliteration and pronunciation are markedly different; see{{l}}for caveats involving this modifierg: comma-separated list of gender/number specifications (with no space after the comma); see Module:gender and number for the complete list- Each individual specification can take its own label, qualifier and reference inline modifiers. For example:
amor<g:m,f<l:archaic,or,poetic>>, which would display as amor m or (archaic or poetic) f. Here, the Catalan word amor has two possible genders, masculine (standardly) and feminine (in archaic or poetic use), and a label is given on the feminine gender indicating its usage restrictions.
- Each individual specification can take its own label, qualifier and reference inline modifiers. For example:
alt: alternative display textpos: part of speech; see{{l}}for a discussion of the recognized part of speech abbreviationsng: arbitrary non-gloss explanatory text- This is displayed within the parentheses containing the link annotations such as transliteration and gloss, and follows them, displayed in an upright font without any surrounding quotes.
- It should be used sparingly; in particular, in many situations it may make more sense to specify the text with a qualifier, using
<q:...>or<qq:...>.
lit: literal meaningid: sense ID, for linking to a particular meaning of a term with several meanings; see{{senseid}}sc: script code for the script that the term is written in; see WT:Scripts for the full list- It is rarely necesssary to specify this explicitly.
- If not given, the script will be autodetected based on the characters in the term and the scripts in the language's data table (see Module:languages § Language:findBestScript), and the result is almost always correct.