Template:Wikipedia languages/core: Difference between revisions
update to use {{#language:}} per Template talk:Wikipedia languages/core#Edit request on 29 September 2013 |
class="autonym" to ensure that all the letters are shown with the Autonym font |
||
Line 1: | Line 1: | ||
<includeonly>[{{fullurl:{{{1}}}:}} <span title="{{#language:{{{1}}}|en}} ({{{1}}}:)" lang="{{{1}}}">{{#ifeq:{{{1}}}|simple|English (simple)|{{#language:{{{1}}}}}}}</span>]</includeonly><noinclude> |
<includeonly>[{{fullurl:{{{1}}}:}} <span class="autonym" title="{{#language:{{{1}}}|en}} ({{{1}}}:)" lang="{{{1}}}">{{#ifeq:{{{1}}}|simple|English (simple)|{{#language:{{{1}}}}}}}</span>]</includeonly><noinclude> |
||
{{Documentation}} |
{{Documentation}} |
||
</noinclude> |
</noinclude> |
Revision as of 21:08, 6 November 2013
![]() | This template is used in MediaWiki:Statistics-footer. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid major disruption, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Please discuss changes on the talk page before implementing them. |
This is the /core template for {{Wikipedia languages}}, which is the template for the "Wikipedia languages" section on the main page.
The template is used to ensure a consistent formatting of the links, which hasn't always been the case (for some time, the Japanese and Chinese links were within {{Lang}}, which categorized the main page within Category:Articles containing Japanese-language text and Category:Articles containing Chinese-language text.
Technical part
The links of this template show a mouseover, which is the English language name of the language and its IS0 639 code within brackets. To determine the English name, it calls #language parser function. Furthermore, there is a "lang" attribute so that browsers recognize it's a non-English text and treat it properly. The text of the link then uses the parser function {{#language:}}
, which displays the language's native name as it's used by MediaWiki, e.g. within the interwiki links. This is done to ensure consistency with the interwiki links in the sidebar.