Vorlage:Deutsch: Unterschied zwischen den Versionen

Aus Wohnheim TF
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „<includeonly><div class="lang"><ul> <li class="lang_main">[[{{NAMESPACE}}:{{PAGENAME}}|EN]]</li> <li>[[{{NAMESPACE}}:{{PAGENAME}}/de|DE]]</li> <li>[[{{NAMESPAC…“)
 
Zeile 1: Zeile 1:
<includeonly><div class="lang"><ul>
<includeonly><div class="lang"><ul>
<li class="lang_main">[[{{NAMESPACE}}:{{PAGENAME}}|EN]]</li>
<li class="lang_main">[[{{NAMESPACE}}:{{PAGENAME}}|DE]]</li>
<li>[[{{NAMESPACE}}:{{PAGENAME}}/de|DE]]</li>
<li>[[{{NAMESPACE}}:{{PAGENAME}}/en|EN]]</li>
<li>[[{{NAMESPACE}}:{{PAGENAME}}/es|DE]]</li>
<li class="lang_title">Article Title: {{PAGENAME}}</li>
<li class="lang_title">Article Title: {{PAGENAME}}</li>
</ul></div>
</ul></div>
{{DISPLAYTITLE:{{{1}}}|{{PAGENAME}}}}
{{DISPLAYTITLE:{{{1}}}|{{PAGENAME}}}}
[[Category:EN]]
[[Category:DE]]
</includeonly>
</includeonly>



Version vom 5. Oktober 2012, 16:22 Uhr



Usage

OrigLang{{OrigLang|}}

You may display a title to your page, that is different to the page name by OrigLang{{OrigLang|Title}}. On the translated pages, you have to change it to use the second Template Template:Lang.

Documentation

This template should be added to all original english articles in the main namespace, at least to all that are or are supposed to be translated.

It shows the list of all languages an article should be translated to and also sets the correct, localised display title of the article.

Adding new Languages

Additional languages can easily be added here. You just need to add one line:

  • put a new language link into the div container (please make sure they are alphabetically ordered):
<li>[[{{NAMESPACE}}:{{PAGENAME}}/hu|HU]]</li>

The subpages will automatically be used by different MediaWiki extensions which detect language settings in browsers or user preferences. The user will then automatically be redirected into the appropriate subpage.

Appearance

The CSS code for the div container of the class "lang" can be adopted in MediaWiki:Common.css.