Difference between revisions of "Template:Translations"

From Creative Commons
Jump to: navigation, search
 
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>
+
<includeonly>{{Translations/code
<div style="background-color:#ddffdd;margin-bottom:10px;display:block;margin-top:5px;">
+
|articles={{{articles|}}}
<table style="border:1px solid #AAAAAA; border-collapse:collapse; clear:both; font-size:85%; margin: 0.25em 0;width:98%;">
+
|rtl={{{rtl|}}}
<tr style="background: #EEF3E2">
+
|message-languages=Languages:
<th style="vertical-align:middle;white-space: nowrap; padding: 4px 1em; border-right: 1px solid #aaaaaa;width:15%;">[[File:Languages.png|link=CcWiki:Translate|middle]] [[CcWiki:Translate|Languages:]]</th>
+
|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]].
<td style="background: #F6F9ED;padding-left:10px;">{{#if:{{{articles|}}}|{{#arraymap:{{{articles}}}|,|x|[[Has translation::x]]|,  }}|[[Category:Untranslated]]}}{{#if:{{#explode:{{PAGENAME}}|:|0}}
+
}}</includeonly><noinclude>
|[[Has language::{{lc:{{#explode:{{PAGENAME}}|:|0}}}}| ]]
+
Template '''{{PAGENAME}}''' should be used to link an article in the wiki to all its translations. It produces a languages box, that shows in what languages the article is available. The translations should link back to the article using [[Template:Translated From]].
|[[Has language::{{CONTENTLANGUAGE}}| ]]}}</td>
+
 
</tr></table>
+
This template is an interface that supplies messages in English to the real code, available at [[Template:Translations/code]]. If a translation to your language is not yet available, please translate this interface and its messages to your language. Refer to [[Template:Pt:Traduções]] for an example that also shows how to translate the parameter names.
</includeonly><noinclude>
 
__NOEDITSECTION__
 
  
This is the <code>Translations</code> template.  It can be used to link to translations of an article in the wiki.  To use it in your article, insert it as follows:
+
== Use ==
 +
To use it in your article written in English, insert it as follows:
  
 
<pre>
 
<pre>
{{Translations|
+
{{Translations
  articles=Es:Foo,Hr:Bar
+
| articles = Es:Foo,Hr:Bar
 +
| rtl = True (optional)
 
}}
 
}}
 
</pre>
 
</pre>
Line 21: Line 21:
 
Any number of translations can be listed in the <code>articles</code> parameter, separated by commas.
 
Any number of translations can be listed in the <code>articles</code> parameter, separated by commas.
  
If no translations are specified, the page is marked as ''Untranslated''.
+
If no translations are specified, the page is placed in [[:Category:Untranslated]].
 +
 
 +
If the article is in a right-to-left language (which is obviously not the case in English), use <code>rtl = True</code> to indicate it. Otherwise, omit this parameter.
  
==See also==
+
If your original article is not in English, please translate this template to the language of the article and use it instead.
*[[CcWiki:Translate]]
+
 
*[[Template:Translated_From]]
+
== See also ==
 +
*[[CC Wiki:Translate]]
 +
*[[Template:Translated From]]
 +
 
 +
{{Translations
 +
| articles = Template:Pt:Traduções
 +
}}
  
 
[[Category:Translation templates]]
 
[[Category:Translation templates]]
 +
__NOEDITSECTION__
 
</noinclude>
 
</noinclude>

Latest revision as of 15:24, 27 April 2011

Template Translations should be used to link an article in the wiki to all its translations. It produces a languages box, that shows in what languages the article is available. The translations should link back to the article using Template:Translated From.

This template is an interface that supplies messages in English to the real code, available at Template:Translations/code. If a translation to your language is not yet available, please translate this interface and its messages to your language. Refer to Template:Pt:Traduções for an example that also shows how to translate the parameter names.

Use

To use it in your article written in English, insert it as follows:

{{Translations
| articles = Es:Foo,Hr:Bar
| rtl = True (optional)
}}

Any number of translations can be listed in the articles parameter, separated by commas.

If no translations are specified, the page is placed in Category:Untranslated.

If the article is in a right-to-left language (which is obviously not the case in English), use rtl = True to indicate it. Otherwise, omit this parameter.

If your original article is not in English, please translate this template to the language of the article and use it instead.

See also