Template:interlinear/documentation

From Wiktionary, the free dictionary
Jump to navigation Jump to search
Documentation for Template:interlinear. [edit]
This page contains usage information, categories, interwiki links and other content describing the template.
This template documentation page is experimental.
The details of its operation have not yet been fully decided upon. Do not deploy widely until the template documentation page is finished.

Interlinear gloss template, inspired by w:Template:Interlinear. Powered by Module:interlinear. Gloss abbreviations are specified in Module:interlinear/data.

The interlinear gloss consists of at least two display lines (source text and glosses) and a possible translation line. A display line is split into words by spaces. An empty word on a display line can be given as {}. To use spaces within a single 'word', enclose the wanted string in braces (e.g. {foo bar}).

Formatting can be added to display lines, but should never span multiple words (cells in a display line).

Parameters

[edit]

The template takes three required positional parameters and several optional parameters.

|1= (required)
The language code (see Wiktionary:Languages) for the language that the term is in. All Wiktionary language codes are supported, including those for constructed and reconstructed languages.
|2= (required)
The text in the source language as a display line.
|3= (required)
The glosses as a display line. Gloss abbreviations can be given with uppercase letters, such as store-ILL. To exempt a string of letters from being treated as an abbreviation, prefix it with ^. To apply "not" to an abbreviation, prefix it with !: it will add an N to the beginning of the abbreviation and "non-" to the beginning of the tooltip.
|4= (optional)
A translation of the entire given text.
|sc= (optional)
The script code (see Wiktionary:Scripts) for the script that the term is written in. When no code is given, the template will try to detect the script based on the characters in the term and the scripts in the language's data table (see Module:languages § Language:findBestScript). In most cases, it will succeed. If it fails, the code None will be used.
|tr= (optional)
Transliteration for non-Latin-script words as a display line. By default, automatic transliteration will be used. Pass |tr=- to suppress transliteration. - for a word suppresses transliteration for one word and + uses the automatic transliteration for one word.
|top= (optional)
Text to be displayed above the interlinear gloss.
|header= (optional)
A display line that will be displayed above the sentence, e.g. to represent roles in the sentence in English.
|morph= (optional)
A morphological breakdown of the morphemes in the source text as a display line. Links can be added here and they will automatically point to the correct language entry.
|wt= (optional)
A word-for-word translation as a display line.

Display line order

[edit]

This order is applied to display lines:

  • headers
  • source text
  • transliteration
  • morphology
  • glosses
  • word-for-word translation

The full translation will be given last after all of the display lines.

Examples

[edit]
{{interlinear|fi
|minä menen kauppaan
|PN-1.SG go-IND.1.SG.PRES store-ILL.SG
|wt=I go {to the store}
|I (will) go to the store}}
minämenenkauppaan
PN-1.SGgo-IND.1.SG.PRESstore-ILL.SG
Igoto the store
"I (will) go to the store"
{{interlinear|ja
|この ケーキ は 美味しい。 誰 が 焼いた の?
|tr=Kono kēki wa oishii. Dare ga yaita no?
|This cake TOP tasty-PRS Who SUBJ bake-PAST Q
|This cake is tasty. Who baked ('''it''')?}}
このケーキ美味しい。焼いたの?
Konokēkiwaoishii.Daregayaitano?
ThiscakeTOPtasty-PRSWhoSUBJbake-PASTQ
"This cake is tasty. Who baked (it)?"