Difference between revisions of "Template:Translation"

From ChoralWiki
Jump to navigation Jump to search
(doc updated)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<p><b><big>{{flag|{{{1}}}}} {{{pre|}}} {{{1}}} {{{post|}}} translation</big></b></p><includeonly>[[Category:Translations]][[Category:{{{1}}} translations]]</includeonly>{{#if:{{{2|}}}|{{#tag:poem|{{{2}}} }}}}<noinclude>
+
<includeonly>{{flag|{{{1}}}}} <b><big>{{{1|}}} translation</big></b>[[Category:Translations]][[Category:{{{1}}} translations]]</includeonly>{{#if:{{{2|}}}|{{#tag:poem|{{{2}}} }}}}<noinclude>
 
{{Doc|text=
 
{{Doc|text=
 
This template categorizes a page in {{CiteCat|Translations}} and in [[Category:<nowiki><</nowiki>Language<nowiki>></nowiki> translations]].  If the <nowiki><</nowiki>Language<nowiki>></nowiki> flag exists, it is displayed.
 
This template categorizes a page in {{CiteCat|Translations}} and in [[Category:<nowiki><</nowiki>Language<nowiki>></nowiki> translations]].  If the <nowiki><</nowiki>Language<nowiki>></nowiki> flag exists, it is displayed.
 
=== Basic syntax ===
 
=== Basic syntax ===
{{tl|Translation|<Language>}}
+
<tt><nowiki>{{Translation|<Language>}}</nowiki></tt>
 +
 
 
;Examples''':'''
 
;Examples''':'''
{{tl|Translation|Italian}}<br>
+
<tt><nowiki>{{Translation|Italian}}</nowiki></tt>
displays
+
::'''''displays'''''
: <big>'''{{flag|Italian|show}} translation'''</big>
+
{{Flag|Italian}}<big><b> Italian translation</b></big>
{{tl|Translation|Quenya}}<br>
+
 
displays
+
 
: <big>'''{{flag|Quenya|show}} translation'''</big>
+
<tt><nowiki>{{Translation|Quenya}}</nowiki></tt>
 +
::'''''displays'''''
 +
{{Flag|Quenya}}<big><b> Quenya translation</b></big>
  
 
=== Syntax with two parameters ===
 
=== Syntax with two parameters ===
{{tl|Translation|<Language>|<Text>}}
+
<tt><nowiki>{{Translation|<Language>|<Text>}}</nowiki></tt>
 
;Example''':'''
 
;Example''':'''
<pre>{{Translation|Portuguese|
+
<tt><nowiki>{{Translation|Portuguese|</nowiki><br>
Ave Maria, cheia de graça
+
<nowiki>Ave Maria, cheia de graça</nowiki><br>
o Senhor é contigo.
+
<nowiki>o Senhor é contigo.</nowiki><br>
Bendita és tu entre as mulheres,
+
<nowiki>Bendita és tu entre as mulheres,</nowiki><br>
e bendito o fruto de teu ventre, Jesus.
+
<nowiki>e bendito o fruto de teu ventre, Jesus.}}</nowiki></tt>
}}</pre>
+
 
 +
::'''''displays'''''
 +
 
 +
{{Flag|Portuguese}}<big><b> Portuguese translation</b></big><br>
 +
Ave Maria, cheia de graça<br>
 +
o Senhor é contigo.<br>
 +
Bendita és tu entre as mulheres,<br>
 +
e bendito o fruto de teu ventre, Jesus.<br>
  
The above is equivalent to the syntax previously used:
+
<!--The above is equivalent to the syntax previously used:
 
<pre>{{Translation|Portuguese}}
 
<pre>{{Translation|Portuguese}}
 
<poem>
 
<poem>
Line 30: Line 40:
 
e bendito o fruto de teu ventre, Jesus.
 
e bendito o fruto de teu ventre, Jesus.
 
&lt;/poem></pre>
 
&lt;/poem></pre>
 
+
-->
}}<br>
+
<!--OLD CODE:
{{prot-temp}}
+
<p><b>{{flag|{{{1}}}}} {{{pre|}}} <big>{{{1}}} {{{post|}}} translation</big></b></p><includeonly>[[Category:Translations]][[Category:{{{1}}} translations]]</includeonly>{{#if:{{{2|}}}|{{#tag:poem|{{{2}}} }}}}<noinclude>-->
 +
}}<br>{{prot-temp}}
 
[[Category:Text formatting templates]]
 
[[Category:Text formatting templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 02:33, 16 May 2021


Documentation

This template categorizes a page in Translations and in [[Category:<Language> translations]]. If the <Language> flag exists, it is displayed.

Basic syntax

{{Translation|<Language>}}

Examples:

{{Translation|Italian}}

displays

Italian.png Italian translation


{{Translation|Quenya}}

displays

Quenya translation

Syntax with two parameters

{{Translation|<Language>|<Text>}}

Example:

{{Translation|Portuguese|
Ave Maria, cheia de graça
o Senhor é contigo.
Bendita és tu entre as mulheres,
e bendito o fruto de teu ventre, Jesus.}}

displays

Portuguese.png Portuguese translation
Ave Maria, cheia de graça
o Senhor é contigo.
Bendita és tu entre as mulheres,
e bendito o fruto de teu ventre, Jesus.