模板:Verse translation
本模板使用以下模板樣式: |
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|lang=ISO 639 language code or IETF language tag|original text|translation|attr1=original text attribution|attr2=translation attribution|width=width of all contents}}
{{Verse translation|lang=|italicsoff=|rtl1=|<!--original text-->|<!--translation-->|attr1=|attr2=}}
{{Verse translation
| lang =
| italicsoff =
| rtl1 =
| <!--original text-->
| <!--translation-->
| attr1 =
| attr2 =
}}
Examples
編輯Basic example
編輯The first two parameters are required, unlabelled, and hold the two texts. For example:
原始碼 | 效果 | ||
---|---|---|---|
|
| ||
While |lang=de
is omitted from this minimal example, the |lang=
parameter should be specified in normal use.
Line breaks in the code texts are preserved in the display. Extra markup like <br />
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 |attr1=
and |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, <br />
can be used, as below. Also optional (though recommended by Manual of Style/Accessibility § Other languages) is |lang=
, which takes an IETF language tag or ISO 639 language code in the same format as {{lang}}. For example:
Markup |
| ||||
Renders as |
|
Notice that the <ref>...</ref>
markup is added before the attribution parameters.
Italic override
編輯If |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:
原始碼 | 效果 | ||||
---|---|---|---|---|---|
|
| ||||
Right-to-left text
編輯If |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:
原始碼 | 效果 | ||
---|---|---|---|
|
| ||
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 |lang=
parameter covers the first block of text in this template. It is good practice to enclose any other non-English text—such as in |attr1=
—in the {{lang}} template, as in the full example above.
Indentation
編輯The indentation provided automatically in this template is approximately equal to <blockquote>
and <poem>
in the following examples:
原始碼 | 效果 |
---|---|
|
Text.
More text. |
原始碼 | 效果 |
---|---|
|
Text. Indented text. More text. |
However, it looks markedly different on mobile, and lacks the semantics of <blockquote>
.
Prose
編輯Although optimized for verse, the template works equally well for prose. For example:
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. |
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. |
—Gaius Julius Caesar, Commentarii de Bello Gallico 1.1 | —translated by W.A. McDevitte and W.S. Bohn |
TemplateData
編輯Use this template to provide a side-by-side translation of a text
參數 | 描述 | 類型 | 狀態 | |
---|---|---|---|---|
Original text | 1 | 沒有描述
| 不明 | 必填 |
Translation | 2 | 沒有描述 | 不明 | 非必填 |
Language code (original text) | lang | ISO 639 language code or IETF language tag for the first column of text.
| 不明 | 非必填 |
Italics (original text) | italicsoff | 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.
| 不明 | 非必填 |
Right-to-left (original text) | rtl1 | 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.
| 不明 | 非必填 |
Attribution (original text) | attr1 | Attribution(s) for the original text
| 不明 | 非必填 |
Attribution (translation) | attr2 | Attribution(s) for the translation
| 不明 | 非必填 |
Width (all texts) | width | Limit the width of the template enclosing entire content.
| 不明 | 非必填 |
See also
編輯- {{Quote}}——不帶邊框的引用,可設定高度。
- {{Verse translation}}——引用外文詩歌、歌詞等引文,並附上譯文
帶邊框式
- {{Wquote}}——帶柔和漸變的灰色陰影,採用圓角。
- {{現代顯示框}}——同樣帶柔和漸變的灰色陰影,但更為柔和、沒有圓角,且更為美觀。
- {{現代藍邊、漸變底紋顯示框}}——框內由上至下呈現白色至藍色的漸變,非常柔和,邊線偏藍且較為柔和。
- {{Quote box}}——帶邊框的引用,在一個縮小的浮動框中。
- {{Quote frame}}——帶邊框的引用。
- {{Squote}}——帶邊框的引用,有立體感。
帶引號式
討論頁
- {{Talk quote inline}}——引用討論頁的內容。
- {{Talk quote block}}——引用討論頁的內容,文字內容會自動添加「綠色」的底色。
- Category:引文模板——更多模板。