x

Table of Contents

Download InterlinearTranslation.php, a plugin written for PhpWiki 1.3.10.

An interlinear is a linguistic explanation of a text (or recorded speech), where a breakdown of the linguistic components is written between each line.

Usage

<?plugin InterlinearTranslation include=ortho,grammar
     This is a simple example.
     dem v art adj n
?>
<?plugin InterlinearTranslation delimiter=~
     Estoy~probándolo.~~~
     estar (1SG)~probar~-ando~lo
     aux v~v~prog~pron
     be (1SG)~test~-ing~it
     I am testing it.
?>

Plugin Arguments

border: the border between each "word" in the interlinear. Default: 0
titles: whether titles for each line of the interlinear are displayed: Default: 0
delimiter: the string that separates items of the interlinear. Default: ' ' (space)
include: the lines of the interlinear to include. Default: ortho,morph,grammar,gloss,smooth
exclude: the lines of the interlinear to exclude. Default: ''
linguistic_terms: whether to use standard linguistic terminology or non-technical terms. Default: 0
language: the name of the language being translated. Default: ''
subpage: the name of the subpage under the language name that morpheme links will be subpages of. Default: 'Dictionary'

See the Notes section below for an explanation of the possible values for the include and exclude options, and for a discussion of what a morpheme is.

To keep a multi-morpheme word from being split across cells, include as many delimiters after the word as it has morphemes. (See the Spanish word "probándolo" in the example.) In sentences whose words are exclusively made up of one morpheme, the default delimiter (space) will probably be the easiest to use. (See the English example below.)

Note that for the last word on every line, if it has n morphemes, you include n-1 delimiters after it. (This is because the newline acts as a delimiter.) For words in all other positions, include n delimiters following the word.

This plugin supports including more than one analyzed sentence in the same plugin invocation. Use blank lines between the sentences to have a text grouped together. Note that all sentences so included must have the same number of lines each. That is, if you gave an argument of include=ortho,smooth, each sentence in that plugin's invocation must include exactly those two lines, no more, no less.

If you are in the middle of a translation and want the first half of your text to include all five lines of information, but the bottom half only has two lines each, you may comment out the extra lines from the top until you are done. Any line whose first two characters are // will be totally ignored by the plugin.

If you set the language option, all morphemes in the Morphemic Breakdown row will be made into wiki links to LanguageName/Dictionary/Morpheme, with the linked page's name automatically capitalized and stripped of embedded spaces. Prefixing a morpheme with "!" will suppress linking that one morpheme. If you exclude the Morphemic Breakdown row, the language option will do nothing.

Setting subpage to a slash ("/") will make dictionary links be supages directly under the language name: LanguageName/Morpheme. Setting subpage to anything else will make that string be the intermediate subpage, taking the place of the default "Dictionary," like LanguageName/Subpage/Morpheme.

Examples

<?plugin InterlinearTranslation delimiter=~ titles=1 language=Asha'ille
     Jhor'nes~~ta~~jhalle?~
     jhor~nes~te~!Q~jhelle~!Q
     // THIS LINE WILL BE IGNORED
     cop~n~cop~Q~adj~Q
     is~this~is~~good~
     Is this good?
?>
<?plugin InterlinearTranslation exclude=morph,gloss,smooth
     Test  the second instance.
     v (IMP) art adj n
?>

It looks pretty ugly with border set to anything but 0, but for the sake of complete examples it's included here. It's most useful for testing that you've set the table up properly -- right number of delimiters and so forth.

<?plugin InterlinearTranslation delimiter=~ border=1 titles=1 linguistic_terms=1
     Estoy~probándolo.~~~
     estar (1SG)~probar~-ando~lo
     v~v~prog~pron
     be (1SG)~test~-ing~it
     I am testing it.
?>

Known Problems

Fixed

Notes

The five valid options to include and exclude are:

ortho : the orthograpy, or standard spelling in non-linguistic terms
morph : the morphemes, or basic meaning components of a word
grammar : the grammatical functions, or parts of speech
gloss : the literal, short translation of a morpheme, or basic meaning component
smooth : the smooth, or natural-sounding, translation of entire phrase

A bit more of an explanation of what a morpheme is is in order, since this plugin does most of its work at the morpheme (rather than whole-word) level. A morpheme is the smallest meaningful unit of a word. For example, the English word unhappiness can be broken into three morphemes: un-, happy, and -ness. So long as the unit has an identifiable meaning, it counts as a morpheme; it is irrelevant whether it can be a word by itself.

Note that each syllable of a word is not necessarily a morpheme, because each syllable might not mean anything on its own. In the previous example, for instance, you cannot say that the word happy is made of two morphemes, happ- and -y. Although in the word dirty, the morpheme -y means characterized by, so that the whole word means characterized by dirt, the same cannot be said of happy. In this case, the word just happens to end with a y; there is no such morpheme happ, nor can you think of happy as meaning characterized by happ. Morphemes are the basic meaning unit, beyond which you cannot divide a word and still say that all the smaller parts have meanings of their own.

When translating, it makes sense to break words down into morphemes, because those are the units of meaning which you are translating in the first place.