Difference between revisions of "Template:Translations"
(corrected extraction of language code: PAGENAME fails for "Case Studies/Es:Page", returning language "Case Studies/Es:"; use SUBPAGENAME instead) |
(removed the forcing of lowercase for the language code, to be consistent with Template:Translated From) |
||
Line 5: | Line 5: | ||
<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> | <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> | ||
<td style="background: #F6F9ED;padding-left:10px;">{{#if:{{{articles|}}}|{{#arraymap:{{{articles}}}|,|x|[[Has translation::x]]|, }}|[[Category:Untranslated]] There are no known translations for this page. Please read the directions on [[CcWiki:Translate|how to add a translation]].}}{{#if:{{#explode:{{SUBPAGENAME}}|:|0}} | <td style="background: #F6F9ED;padding-left:10px;">{{#if:{{{articles|}}}|{{#arraymap:{{{articles}}}|,|x|[[Has translation::x]]|, }}|[[Category:Untranslated]] There are no known translations for this page. Please read the directions on [[CcWiki:Translate|how to add a translation]].}}{{#if:{{#explode:{{SUBPAGENAME}}|:|0}} | ||
− | |[[Has language: | + | |[[Has language::{{#explode:{{SUBPAGENAME}}|:|0}}| ]] |
|[[Has language::{{CONTENTLANGUAGE}}| ]]}}</td> | |[[Has language::{{CONTENTLANGUAGE}}| ]]}}</td> | ||
</tr></table></div> | </tr></table></div> |
Revision as of 00:23, 18 April 2011
This is the Translations
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:
{{Translations| articles=Es:Foo,Hr:Bar }}
Any number of translations can be listed in the articles
parameter, separated by commas.
If no translations are specified, the page is marked as Untranslated.