Jump to content

Template:Wikipedia languages/core: Difference between revisions

From Elite Dangerous Wiki
Content deleted Content added
nan=Bân-lâm-gú
 
m Protected "Template:Wikipedia languages/core": Pre-registration protection review: Protection notice: cascade-protected template (parent documented by Template:Wikipedia languages/core/doc) ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<includeonly>[{{fullurl:{{{1}}}:}} <span class="autonym" title="{{#language:{{{1}}}|en}} ({{{1}}}:)" lang="{{#switch:{{{1}}}|simple=en|{{{1}}}}}">{{#switch:{{{1}}}|no=Norsk bokmål|sh=Srpskohrvatski|simple=Simple English|sr=Srpski|uz=Oʻzbekcha|nan=Bân-lâm-gú|{{ucfirst:{{#language:{{{1}}}}}}}}}</span>]</includeonly><noinclude>
<includeonly>[{{fullurl:{{FULLPAGENAME}}|readerlang={{urlencode:{{{1|en}}}}}} <span class="autonym" title="{{#language:{{{1}}}|en}} ({{{1}}}:)" lang="{{#switch:{{{1}}}|simple=en|{{{1}}}}}">{{#switch:{{{1}}}|no=Norsk bokmål|sh=Srpskohrvatski|simple=Simple English|sr=Srpski|uz=Oʻzbekcha|nan=Bân-lâm-gú|{{ucfirst:{{#language:{{{1}}}}}}}}}</span>]</includeonly><noinclude>
{{Documentation}}
{{Documentation}}
</noinclude>
</noinclude>

Latest revision as of 21:32, 31 October 2026

Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit "Template:Wikipedia languages/core/doc" to edit its documentation if it is available. (How does this work?)

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.