සැකිල්ල:pi-link
- පහත දැක්වෙන උපදෙස්, සැකිල්ල:pi-link/documentation හි පිහිටා ඇත. සැකිල්ල:pi-link/documentation]]. [සංස්කරණය]
- ප්රයෝජනවත් සබැඳි: උප පිටු ලැයිස්තුව • සබැඳි • යළි යොමු • transclusions • errors (parser/module) • sandbox
This template generates a link to an entry in Pali and to its Roman script equivalent if different. It links to the Pali section on the target page, and applies language-specific formatting. It can also show a number of annotations after the linked term.
There are several linking templates:
{{pi-link}}
, corresponding to{{link}}
. Use this template outside running text, in sections that list entries, such as “Synonyms”, “Related terms”, and “Descendants”.{{pi-mention}}
, corresponding to{{mention}}
). Use this template when a particular term is mentioned (as in the use–mention distinction) within running English text, as in definitions or in “Etymology” and “Usage notes” sections.- There are currently no analogues to
{{l-self}}
or{{m-self}}
.
All of these templates create a link to a language's section of an entry. As an unimplemented extension they might instead link to a language-specific sense id created by the template {{senseid}}
if the |id=
parameter were used.
This template uses Module:links as a back-end, so it supports all the features and bugs of that module. Please see its documentation for more details. The numerous combinations of options are managed by the template {{pi-ml}}
.
Parameters
සංස්කරණයThe template takes one required positional parameter and several optional parameters. Note that either the first positional parameter should be given, although technically neither is required.
|1=
- The page name to be linked to.
|2=
(optional)- Not implemented. Alternate text to display as the link title, if different from the page name.
|t=
- A gloss or short translation of the word.
|tr=
(optional)- Transliteration for non-Latin-script words. This parameter is not allowed if the term is already in the Latin script. Use
tr=-
if you don't want a transliteration to be automatically generated. If the transliteration is suppressed, the Roman script equivalent will only be displayed if explicitly specified. |eqv=
(optional)- The (canonical) Roman script equivalent where different from the transliteration. Examples of its use are given below. This might be appropriate for a non-IAST Roman script form if such an entry were permitted.
|ts=
(optional)- Not implemented. Transcription for non-Latin-script words whose transliteration is markedly different from the actual pronunciation. Should not be used for IPA pronunciations.
|pos=
(optional)- A part of speech indication for the term.
|lit=
(optional)- Not implemented. A literal translation for the term.
|id=
(optional)- Not implemented. A sense id for the term, which links to anchors on the page set by the
{{senseid}}
template. |demo=1
(optional)- Attempt to produce red text rather than raising a module error for erroneous input.
Examples
සංස්කරණයThese examples serve also as test cases and as a key to annotations in the body of the template.
No | Wikitext | Result | Annotation | Form by other means |
---|---|---|---|---|
1 | {{pi-link|ᨴᩮᩅ}} | ᨴᩮᩅ (deva) | NNNN | ᨴᩮᩅ (deva) |
2 | {{pi-link|ᨴᩮᩅ|t=god}} | ᨴᩮᩅ (deva, සැකිල්ල:m-g) | NNYN | ᨴᩮᩅ (deva, “god”) |
3 | {{pi-link|ທັມມະ|eqv=dhamma}} | ທັມມະ (damma ⇨ dhamma) | NYNN | ທັມມະ (damma ⇨ dhamma) |
4 | {{pi-link|ທັມມະ|eqv=dhamma|t=reason}} | ທັມມະ (damma ⇨ dhamma, “reason”) | NYYN | ທັມມະ (damma ⇨ dhamma, “reason”) |
5 | {{pi-link|สุตวา|tr=sutvā}} | สุตวา (sutvā) | YNNN | สุตวา (sutvā) |
6 | {{pi-link|สุตวา|tr=sutvā|t=having heard}} | สุตวา (sutvā, සැකිල්ල:m-g) | YNYN | สุตวา (sutvā, “having heard”) |
7 | {{pi-link|ພຸດໂທ|tr=buddo|eqv=buddho}} | ພຸດໂທ (buddo ⇨ buddho) | YYNN | ພຸດໂທ (buddo ⇨ buddho) |
8 | {{pi-link|ພຸດໂທ|tr=buddo|eqv=buddho|t=buddha}} | ພຸດໂທ (buddo ⇨ buddho, “buddha”) | YYNN | ພຸດໂທ (buddo ⇨ buddho, “buddha”) |
9 | {{pi-link|ᨴᩮᩅ|tr=-}} | ᨴᩮᩅ | -NNN | ᨴᩮᩅ |
10 | {{pi-link|ᨴᩮᩅ|tr=-|t=god}} | ᨴᩮᩅ (“god”) | -NYN | ᨴᩮᩅ (“god”) |
11 | {{pi-link|ທັມມະ|tr=-|eqv=dhamma}} | ທັມມະ (dhamma) | -YNN | ທັມມະ (dhamma) |
12 | {{pi-link|ທັມມະ|tr=-|eqv=dhamma|t=reason}} | ທັມມະ (dhamma, සැකිල්ල:m-g) | -YYN | ທັມມະ (dhamma, “reason”) |
13 | {{pi-link|deva}} | deva | NNNY | deva |
14 | {{pi-link|deva|t=god}} | deva (“god”) | NNYY | deva (“god”) |
15 | {{pi-link|vidú|eqv=vidū}} | vidú (vidū) | NYNY | vidú (vidū) |
16 | {{pi-link|vidú|t=wise|eqv=vidū}} | vidú (vidū, සැකිල්ල:m-g) | NYYY | vidú (vidū, “wise”) |
17 | {{pi-link|deva|tr=devī|demo=1}} | Error: Cannot transliterate Latin script. | YNNY | (Some error indication) |
18 | {{pi-link|deva|tr=junk|t=god|demo=1}} | Error: Cannot transliterate Latin script. | YNYY | |
19 | {{pi-link|vidú|eqv=vidū|tr=vidu|demo=1}} | Error: Cannot transliterate Latin script. | YYNY | |
20 | {{pi-link|deva|t=wise|eqv=vidū|tr=vidu|demo=1}} | Error: Cannot transliterate Latin script. | YYYY | |
21 | {{pi-link|deva|tr=-}} | deva | -NNY | deva |
22 | {{pi-link|deva|tr=-|t=god}} | deva (“god”) | -NYY | deva (“god”) |
23 | {{pi-link|vidú|tr=-|eqv=vidū}} | vidú (vidū) | -YNY | vidú (vidū) |
24 | {{pi-link|vidú|tr=-|t=wise|eqv=vidū}} | vidú (vidū, සැකිල්ල:m-g) | -YYY | vidú (vidū, “wise”) |
Note that if one does not want a link to the standard Roman script equivalent, it is better to simply use {{link}}
.
Customization
සංස්කරණයThe outcome of Wiktionary:Votes/2007-10/style for mentioned terms determined the default style for terms mentioned with the {{mention}}
/{{m}}
template. The preliminary default for Latin-script (i.e. Roman script, not just Latin-language) terms and phrases is italics. Readers can easily toggle the output from italics to bold by selecting “Show other Latin (Roman) script mentions in bold” from WT:PREFS. Alternatively, or for more advanced customization, readers can add styles to their style sheets as described in WT:CUSTOM:
- For plain format (e.g.: From mot + ...):
.mention-Latn { font-style: normal }
- For bold format (e.g.: From mot + ...):
.mention-Latn { font-weight: bold; font-style: normal }
- For italicized format (e.g.: From mot + ...):
.mention-Latn { font-style: italic }
Further, the default style of the subsequent English translation glosses is in double quotes (pending a vote to approve this template). Readers can easily change the output to single quotes by selecting “Show English glosses for mentioned terms in single quotes” from WT:PREFS.