Difference between revisions of "Template:Translated From"

From Creative Commons
Jump to: navigation, search
Line 1: Line 1:
<includeonly>
+
<includeonly>{{Translated From/code
<div style="margin-bottom:15px;display:block;margin-top:5px;clear:both;">
+
|source={{{source|}}}
<table style="border:1px solid #AAAAAA; border-collapse:collapse; clear:both; font-size:85%; margin: 0.25em 0;width:100%;">
+
|rtl={{{rtl|}}}
<tr style="background: #EEF3E2">
+
|rev={{{rev|}}}
<th style="vertical-align:middle;white-space: nowrap; padding: 4px 1em; border-right: 1px solid #aaaaaa;width:15%;">[[File:Languages.png|link=CC Wiki:Translate|middle]] [[CC Wiki:Translate|Languages:]]</th>
+
|message-languages=Languages:
<td style="background: #F6F9ED;padding-left:10px;">
+
|message-no-known-translations=There are no known versions of this page in other languages. Please read the directions on [[{{Translation of|CC Wiki:Translate}}|how to add a translation]].
<strong>[[Translated from::{{{source}}}]]</strong><br/>
+
}}</includeonly><noinclude>
{{#arraymap:
+
Template '''{{PAGENAME}}''' should be used to link the translations of an article to the source. Please refer to [[CC Wiki:Translated]] for learning how to name your translation page. To use this template in your tanslation, insert:
{{#show: {{{source|}}}|mainlabel=-|?Has translation | format=list}}|,|x|x|, }}
 
</td></tr></table>
 
{{#ifeq: {{NAMESPACE}} | {{ns:6}}<!--
 
  the character ":" is not allowed in file names, so a space is used instead -
 
  if leftmost word is not a language code, language is content language -->
 
  | {{#ifeq: {{#language:{{lc:{{#explode:{{SUBPAGENAME}}| |0}}}}}}
 
      | {{lc:{{#explode:{{SUBPAGENAME}}| |0}}}}
 
      | [[Has language::{{CONTENTLANGUAGE}}| ]]
 
      | [[Has language::{{lc:{{#explode:{{SUBPAGENAME}}| |0}}}}| ]]
 
    }}
 
  | {{#ifeq:{{#explode:{{SUBPAGENAME}}|:|0}}|{{SUBPAGENAME}}
 
      | {{#ifeq:{{#explode:{{PAGENAME}}|:|0}}|{{PAGENAME}}
 
          | [[Has language::{{CONTENTLANGUAGE}}| ]]
 
          | {{#ifeq: {{#language:{{lc:{{#explode:{{PAGENAME}}|:|0}}}}}}
 
              | {{lc:{{#explode:{{PAGENAME}}|:|0}}}}
 
              | [[Has language::{{CONTENTLANGUAGE}}| ]]
 
              | [[Has language::{{lc:{{#explode:{{PAGENAME}}|:|0}}}}| ]]
 
            }}
 
        }}
 
      | {{#ifeq: {{#language:{{lc:{{#explode:{{SUBPAGENAME}}|:|0}}}}}}
 
          | {{lc:{{#explode:{{SUBPAGENAME}}|:|0}}}}
 
          | [[Has language::{{CONTENTLANGUAGE}}| ]]
 
          | [[Has language::{{lc:{{#explode:{{SUBPAGENAME}}|:|0}}}}| ]]
 
        }}
 
    }}
 
}}
 
</div>
 
</includeonly><noinclude>
 
__NOEDITSECTION__
 
 
 
This is the <code>Translated From</code> template.  It can be used to link to translations of an article in the wiki back to the original work. When translating an article, add the following to your translation:
 
  
 
<pre>
 
<pre>
 
{{Translated From
 
{{Translated From
  | source=Source Article Name
+
| source = Namespace:Source Article Name
 +
| rev = Revision ID of the page translated
 +
| rtl = True (optional)
 
}}
 
}}
 
</pre>
 
</pre>
  
Translations should be placed into the language namespace; for example, Spanish articles are placed in the <code>Es:</code> namespace.
+
Parameter <code>rev</code> should contain the revision ID of the source page that was the basis of translation. To find out the revision ID, visit the source page's history: placing the mouse pointer over the link to any revision of the page, the respective revision ID will show in the link's URL.
  
 
For right to left languages, an optional <code>rtl=true</code> flag can be included.
 
For right to left languages, an optional <code>rtl=true</code> flag can be included.
 
<pre>
 
{{Translated From
 
  | source=Source Article Name
 
  | rtl=true
 
}}
 
</pre>
 
 
When used outside the main namespace, precede the page name by <code>Namespace:</code>. When used in a file description page, further precede the namespace by a colon:
 
 
<pre>
 
{{Translated From
 
  | source=:File:Source File Description Name
 
}}
 
</pre>
 
  
 
==See also==
 
==See also==
Line 69: Line 25:
  
 
{{Translations
 
{{Translations
  | articles=Template:Pt:Traduzida de
+
| articles = Template:Pt:Traduzida de
 
}}
 
}}
  
 
[[Category:Translation templates]]
 
[[Category:Translation templates]]
 
</noinclude>
 
</noinclude>

Revision as of 00:00, 26 April 2011

Template Translated From should be used to link the translations of an article to the source. Please refer to CC Wiki:Translated for learning how to name your translation page. To use this template in your tanslation, insert:

{{Translated From
| source = Namespace:Source Article Name
| rev = Revision ID of the page translated
| rtl = True (optional)
}}

Parameter rev should contain the revision ID of the source page that was the basis of translation. To find out the revision ID, visit the source page's history: placing the mouse pointer over the link to any revision of the page, the respective revision ID will show in the link's URL.

For right to left languages, an optional rtl=true flag can be included.

See also