Module:RQ:pi:Singthon/documentation

From Wiktionary, the free dictionary
Jump to navigation Jump to search
Documentation for Module:RQ:pi:Singthon. [edit]
This page contains usage information, categories, interwiki links and other content describing the module.

This module is a data module providing a catalogue of passages from one particular book or article for each passage to demonstrate the existence of multiple Pali words. The modules returns a 3-D array (technically a Lua table), indexed as follows:

  1. The outer index is the page number.
  2. The second index is a character string serving as the name of the passage within the page - using the first word is the simplest scheme.
  3. The third index is an element number - the text (item 1), its transliteration (item 2) (optional) and its translation (item 3).

The table has one named element, "reference", that holds the name of the template (namely, {{RQ:pi:Singthon}}) used to identify the source to the reader and format the quote, its transliteration and its translation.

The intention is that the word will be highlighted when selected by these three indices. Words are assigned positive numbers and their boundaries are marked up in the form {number-word}. This mark up can be nested, so that words may contain other words. Different sections may have the same number; this allows for repeated words, overlapping words, and discontiguous translations.

The words are transcluded into a page using an invocation of the form {{RQ:pi:Singthon quote|5|itipi|25}}; this example produces the text:

2011, พระอาจารย์ ดร.สิงห์ทน นราสโภ, บทสวดมนต์ แปล ดุริยมนตรา [Chanting book with translations]‎[1] (overall work in Thai), Bangkok: Sahadhamick, page 5:
อิติปิ โส ภะคะวา อะระหัง สัมมาสัมพุทโธ วิจจา
จะระณะ สัมปันโน สุคะโต โลกะวิทู อะนุตตะโร ปุริสะทัม-
มะสาระถิ สัทถา เทวะมะนุสสานัง พุทโธ ภะคะวาติ ฯ
itipi so bhaɡavā arahaṃ sammāsambuddho vijjā caraṇa sampanno sugato lokavidū anuttaro purisadammasārathi satthā devamanussānaṃ buddho bhagavāti.
Surely, he is a blessed one, an arahat, correctly and completely enlightened, endowed with knowledge and good behaviour, faring well, knowing the universe, an unequalled driver of men who need taming, teacher of gods and men, a buddha, the Blessed One.

There is no advantage in including a passage for the sake of one word; one can use {{RQ:pi:Singthon}} directly for that purpose.