Difference between revisions of "Template talk:Mw-langlink"

From Team Fortress Wiki
Jump to: navigation, search
(Languages in sidebar)
 
m
Line 4: Line 4:
  
 
* MediaWiki interface pages need to be created for all supported languages (in the form of {{code|MediaWiki:Langlink-xx}}). This is necessary since [[MediaWiki:Sidebar]] won't understand templates or redirects, etc.
 
* MediaWiki interface pages need to be created for all supported languages (in the form of {{code|MediaWiki:Langlink-xx}}). This is necessary since [[MediaWiki:Sidebar]] won't understand templates or redirects, etc.
* Each {{code|MediaWiki:Langlink-xx}} page should have the text {{tlx|mw-langlink|xx}}. Since these interface pages ''can'' understand templates, {{tl|mw-langlink}} will output {{code|BASEPAGENAME/xx}} if the page exists, and simply {{code|-}} if it doesn't, which will hide the item altogether.
+
* Each {{code|MediaWiki:Langlink-xx}} page should have the text {{tlx|mw-langlink|xx}}. Since these interface pages ''can'' understand templates, {{tl|mw-langlink}} will output {{code|BASEPAGENAME/xx}} if the page exists, and simply "{{code|-}}" if it doesn't, which will hide the item altogether.
 
* [[MediaWiki:Sidebar]] should be updated to include the code on [[User:Seb26/langlink-display]].
 
* [[MediaWiki:Sidebar]] should be updated to include the code on [[User:Seb26/langlink-display]].
  

Revision as of 23:16, 3 September 2010

Languages in sidebar

I've done some testing and found a way to display the language links in {{Languages}} directly in the sidebar. If all goes well this should directly replace that template. There are a few things that are needed for this to work.

  • MediaWiki interface pages need to be created for all supported languages (in the form of MediaWiki:Langlink-xx). This is necessary since MediaWiki:Sidebar won't understand templates or redirects, etc.
  • Each MediaWiki:Langlink-xx page should have the text {{mw-langlink|xx}}. Since these interface pages can understand templates, {{mw-langlink}} will output BASEPAGENAME/xx if the page exists, and simply "-" if it doesn't, which will hide the item altogether.
  • MediaWiki:Sidebar should be updated to include the code on User:Seb26/langlink-display.
Known issues
  • Does not appear to work in any namespace apart from the Article space. Therefore unless this is fixed, non-article pages should continue to use {{languages}}.

seb26 [talk] 23:07, 3 September 2010 (UTC)