Difference between revisions of "Template:Lang"

From Apache OpenOffice Wiki
Jump to: navigation, search
 
(3 intermediate revisions by one other user not shown)
Line 28: Line 28:
 
<!--li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/lo-la|LO-LA]]</li>
 
<!--li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/lo-la|LO-LA]]</li>
 
<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/lt|LT]]</li>
 
<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/lt|LT]]</li>
<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/mr|MR]]</li>
+
<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/mr|MR]]</li>-->
 
<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/nl|NL]]</li>
 
<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/nl|NL]]</li>
<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/no|NO]]</li>
+
<!--<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/no|NO]]</li>
 
<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/pa|PA]]</li-->
 
<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/pa|PA]]</li-->
 
<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/pt|PT]]</li>
 
<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/pt|PT]]</li>
<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/Página Principal|PT-BR]]</li>
+
<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/pt-br|PT-BR]]</li>
 
<!--li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/ro|RO]]</li>
 
<!--li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/ro|RO]]</li>
 
<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/ru|RU]]</li>
 
<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/ru|RU]]</li>

Latest revision as of 11:17, 24 August 2013

Usage

{{Lang|Localised Page Name}}

Documentation

This template should be added to all translated articles in the main namespace. For the source (English) pages, use the second Template Template:OrigLang.

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 two lines:

  • put a new language link into the div container (please make sure they are alphabetically ordered):
<li>[[{{NAMESPACE}}:{{BASEPAGENAME}}/hu|HU]]</li>
  • put a new case into the sanityzing switch function which adds the page to the correct category:
| hu = [[Category:HU]]

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.

Personal tools