Jump to content

From Noumenapedia

Template:Verse translation/doc

__EXPECTED_UNCONNECTED_PAGE__

Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Uses TemplateStyles.tab.

Usage

This template may be used when a verse text in its original language and its translation into English are to be displayed together. It displays the original text in italics and the translation in roman type. Optionally, it displays attributions for each text below. The main parameter set is the following:

{{Verse translation|lang1=ISO 639 language code or IETF language tag|original text|translation|attr1=original text attribution|attr2=translation attribution|width=width of all contents}}
Full parameter set in horizontal format

<syntaxhighlight lang="wikitext">

<poem style="font-style:roman;text-align:left" lang=""></poem>

Translation:

<poem style="font-style:roman;text-align:left" lang=""></poem>

</syntaxhighlight>

Full parameter set in vertical format

<syntaxhighlight lang="wikitext">

<poem style="font-style:roman;text-align:left" lang=""> </poem>

Translation:

<poem style="font-style:roman;text-align:left" lang=""> </poem>

</syntaxhighlight>

Examples

Basic example

The first two parameters are required, unlabelled, and hold the two texts. For example:

Markup Renders as
<syntaxhighlight lang="wikitext" style="" class="markup-markup"> {{Verse translation |head1=German|lang1=de |Sprechen Sie Deutsch? Ich benötige Hilfe. |head2=English|3= |Do you speak German? I require assistance.}} </syntaxhighlight>
German

<poem style="font-style:italic;text-align:left" lang="de">Sprechen Sie Deutsch?

Ich benötige Hilfe.

</poem>

Translation:
English

<poem style="font-style:roman;text-align:left" lang="en">Do you speak German? I require assistance.</poem>

While <syntaxhighlight lang="wikitext" inline style="display: none;" />|lang1=de is omitted in minimal examples, the <syntaxhighlight lang="wikitext" inline style="display: none;" />|lang1= parameter should be specified in normal use for any language other than English.

<syntaxhighlight lang="wikitext" inline style="display: none;" />|lang1= can also be specified as the alias <syntaxhighlight lang="wikitext" inline style="display: none;" />|lang=, though the other numbered parameters do not have such aliases, and the inconsistency will not be helpful for later editors.

Line breaks in the code texts are preserved in the display. Extra markup like <syntaxhighlight lang="HTML" class="" style="" inline="1">
</syntaxhighlight> is not required, but will also be displayed if included. As shown below, correctly formatted inline references can also be added to both texts.

Full example

The parameters <syntaxhighlight lang="wikitext" inline style="display: none;" />|attr1= and <syntaxhighlight lang="wikitext" inline style="display: none;" />|attr2= are optional, must be labelled, and do not preserve line breaks in the code. They are meant to contain the attributions for (1) the original text and (2) the translation. Either, both, or neither may be used. Their content will be displayed preceded by a dash and in slightly reduced text. These texts do not wrap automatically; if wrapping is required, <syntaxhighlight lang="HTML" class="" style="" inline="1">
</syntaxhighlight> can be used, as below. Also optional (though recommended by Manual of Style/Accessibility § Other languages) is <syntaxhighlight lang="wikitext" inline style="display: none;" />|lang1=, which takes an IETF language tag or ISO 639 language code. For example:

Markup
<syntaxhighlight lang="wikitext">

<poem style="font-style:italic;text-align:left" lang="es">

¿Qué es la vida? — Una ilusión, Una sombra, una ficción, Y el mayor bien es pequeño; Que toda la vida es sueño, Y los sueños sueño son.[1]

</poem>

— Calderón: La vida es sueño
Act II, Scene 19, lines 1197–1201
Translation:

<poem style="font-style:roman;text-align:left" lang="en">What is life? A thing that seems,

A mirage that falsely gleams, Phantom joy, delusive rest, Since is life a dream at best, And even dreams themselves are dreams.[2]

</poem>

  1. ↑ Calderón de la Barca, Pedro (1904). Comfort, William Wistar (ed.). La vida es sueño. New York: American Book Company. p. 104.
  2. ↑ Calderon's Dramas, pp. 78–79. London: Henry S. King & Co., 1873.
</syntaxhighlight>
Renders as

<poem style="font-style:italic;text-align:left" lang="es">

¿Qué es la vida? — Una ilusión, Una sombra, una ficción, Y el mayor bien es pequeño; Que toda la vida es sueño, Y los sueños sueño son.[1]

</poem>

— Calderón: La vida es sueño
Act II, Scene 19, lines 1197–1201
Translation:

<poem style="font-style:roman;text-align:left" lang="en">What is life? A thing that seems,

A mirage that falsely gleams, Phantom joy, delusive rest, Since is life a dream at best, And even dreams themselves are dreams.[2]

</poem>

  1. ↑ Calderón de la Barca, Pedro (1904). Comfort, William Wistar (ed.). La vida es sueño. New York: American Book Company. p. 104.
  2. ↑ Calderon's Dramas, pp. 78–79. London: Henry S. King & Co., 1873.

Notice that the <syntaxhighlight lang="wikitext" inline>[1]</syntaxhighlight> markup is added before the attribution parameters.

Italic override

If <syntaxhighlight lang="wikitext" inline style="display: none;" />|italicsoff= is set to any value, the first column's italics are turned off. This is useful for original texts in non-Latin scripts, for which italics may be neither useful nor appropriate:

Markup Renders as
<syntaxhighlight lang="wikitext" style="" class="markup-markup"> {{Verse translation|lang1=ka|italicsoff=y| მელნად ვიხმარე გიშრის ტბა და კალმად მე ნა რხეული, ვინცა ისმინოს, დაესვას ლახვარი გულსა ხეული. |attr1=[[Shota Rustaveli]]: from ''[[The Knight in the Panther's Skin]]'' |For ink I have used a lake of jet, and for pen a pliant crystal. Whoever hears, a jagged spear will pierce his heart.}} </syntaxhighlight>

<poem style="font-style:roman;text-align:left" lang="ka">

მელნად ვიხმარე გიშრის ტბა და კალმად მე ნა რხეული, ვინცა ისმინოს, დაესვას ლახვარი გულსა ხეული.

</poem>

Translation:

<poem style="font-style:roman;text-align:left" lang="en">For ink I have used a lake of jet, and for pen a pliant crystal. Whoever hears, a jagged spear will pierce his heart.</poem>

Right-to-left text

If <syntaxhighlight lang="wikitext" inline style="display: none;" />|rtl1= is set to any value, the first column's text is aligned right. This is useful for original texts in right-to-left languages like Arabic, as exemplified below:

Markup Renders as
<syntaxhighlight lang="wikitext" style="" class="markup-markup"> {{Verse translation|lang1=ar|italicsoff=y|rtl1=y| خل الذنوب صغيرهاو كبيرها ذاك التقى و اصنع كماش فوق أرض الشوك يحذر ما يرى لا تحقرن صغيرةً إن الجبال من الحصى |Abandon sins, big and small – that is Tawqa And be like the one who walks on a thorny path, he is cautious of what he sees Do not belittle the small sins; truly mountains are made from pebbles}} </syntaxhighlight>

<poem style="font-style:roman;text-align:right" lang="ar">

خل الذنوب صغيرهاو كبيرها ذاك التقى و اصنع كماش فوق أرض الشوك يحذر ما يرى لا تحقرن صغيرةً إن الجبال من الحصى

</poem>

Translation:

<poem style="font-style:roman;text-align:left" lang="en">Abandon sins, big and small – that is Tawqa

And be like the one who walks on a thorny path, he is cautious of what he sees

Do not belittle the small sins; truly mountains are made from pebbles</poem>

Tips

Special characters

As with many other templates, if the characters = or | appear in the verse texts, they will break the template's display. The easiest solution is to replace them with {{=}} or {{!}} respectively.

Language markup

The <syntaxhighlight lang="wikitext" inline style="display: none;" />|lang1= parameter covers the first block of text in this template. It is good practice to enclose any other non-English text—such as in <syntaxhighlight lang="wikitext" inline style="display: none;" />|attr1=—in the {{lang}} template, as in the full example above.

The <syntaxhighlight lang="wikitext" inline style="display: none;" />|lang2= parameter is similar but covers the second block of text (it may be translated in another language than English); defaults to <syntaxhighlight lang="wikitext" inline style="display: none;" />|lang2=en if not specified.

Indentation

The indentation provided automatically in this template is approximately equal to <syntaxhighlight lang="HTML" class="" style="" inline="1">

</syntaxhighlight> and <poem> in the following examples:

Markup Renders as
<syntaxhighlight lang="wikitext" style="" class="markup-markup"> Text. <blockquote>Indented text.</blockquote> More text. </syntaxhighlight>

Text.

Quoted text.

More text.

Markup Renders as
<syntaxhighlight lang="wikitext" style="" class="markup-markup"> Text. <poem style="margin-left: 3em; font-style:italic">Indented text.</poem> More text. </syntaxhighlight>

However, it looks markedly different on mobile.

Prose

Although optimized for verse, the template works equally well for prose. For example:

<poem style="font-style:italic;text-align:left" lang="la"> Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur. Hi omnes lingua, institutis, legibus inter se differunt. Gallos ab Aquitanis Garumna flumen, a Belgis Matrona et Sequana dividit. Horum omnium fortissimi sunt Belgae, propterea quod a cultu atque humanitate provinciae longissime absunt, minimeque ad eos mercatores saepe commeant atque ea quae ad effeminandos animos pertinent important, proximique sunt Germanis, qui trans Rhenum incolunt, quibuscum continenter bellum gerunt. Qua de causa Helvetii quoque reliquos Gallos virtute praecedunt, quod fere cotidianis proeliis cum Germanis contendunt, cum aut suis finibus eos prohibent aut ipsi in eorum finibus bellum gerunt.</poem>

Translation:

<poem style="font-style:roman;text-align:left" lang="en">All Gaul is divided into three parts, one of which the Belgae inhabit, the Aquitani another, those who in their own language are called Celts, in our Gauls, the third. All these differ from each other in language, customs and laws. The river Garonne separates the Gauls from the Aquitani; the Marne and the Seine separate them from the Belgae. Of all these, the Belgae are the bravest, because they are furthest from the civilization and refinement of [our] Province, and merchants least frequently resort to them, and import those things which tend to effeminate the mind; and they are the nearest to the Germans, who dwell beyond the Rhine, with whom they are continually waging war; for which reason the Helvetii also surpass the rest of the Gauls in valor, as they contend with the Germans in almost daily battles, when they either repel them from their own territories, or themselves wage war on their frontiers.</poem>

— translated by W.A. McDevitte and W.S. Bohn

TemplateData

<templatedata> { "description": "Use this template to provide a side-by-side translation of a text", "params": { "1": { "label": "Original text", "type": "unknown", "autovalue": "", "required": true }, "2": { "label": "Translation", "type": "unknown", "autovalue": "", "required": true }, "head1": { "label": "Header or title for the original text" }, "head2": { "label": "Header or title for the translation" }, "italicsoff": { "label": "Italics (original text)", "description": "If set to any value, the first column's italics are turned off. This is useful for original texts in non-Latin scripts, for which italics may be neither useful nor appropriate.", "example": "y" }, "italicsoff2": { "label": "Italics (translation)", "description": "If set to any value, the second column's italics are turned off. This is useful for original texts in non-Latin scripts, for which italics may be neither useful nor appropriate.", "example": "y" }, "rtl1": { "label": "Right-to-left (original text)", "description": "If set to any value, the first column's text is aligned right. This is useful for original texts in right-to-left languages like Arabic.", "example": "y" }, "rtl2": { "label": "Right-to-left (translation)", "description": "If set to any value, the second column's text is aligned right. This is useful for original texts in right-to-left languages like Pashto.", "example": "y" }, "lang1": { "label": "Language code (original text)", "description": "ISO 639 language code or IETF language tag for the first column of text.", "example": "fr", "aliases": [ "lang" ] }, "lang2": { "label": "Language code (translation)", "description": "ISO 639 language code or IETF language tag for the second column of text; defaults to English.", "example": "it" }, "attr1": { "label": "Attribution (original text)", "description": "Attribution(s) for the original text", "example": "Rene Descartes (1644), Principles of Philosophy" }, "attr2": { "label": "Attribution (translation)", "description": "Attribution(s) for the translation", "example": "John Smith (1959)" }, "width": { "label": "Width (all texts)", "description": "Limit the width of the template enclosing entire content.", "example": "100%" } }, "paramOrder": [ "1", "2", "head1", "head2", "lang1", "italicsoff", "rtl1", "attr1", "lang2", "italicsoff2", "rtl2", "attr2", "width" ] } </templatedata>

See also


  1. ↑ ...