Template:Wikipedia: Difference between revisions

m
Reverted edits by Bugman (talk) to last revision by Red Leader
(Improved language support by autodetection from the page title if the 'lang' parameter is not supplied. The logic is copied and modified from {{LangSwitch}}.)
m (Reverted edits by Bugman (talk) to last revision by Red Leader)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<span class="plainlinks">[https://{{{lang|{{#if: {{{ {{lc: {{#titleparts: {{PAGENAME}} | 1}} }}| }}}  <!-- Does the page have a language prefix/language code? -->
<span class="plainlinks">[https://{{{lang|en}}}.wikipedia.org/<!--
                                            | {{{ {{lc: {{#titleparts: {{PAGENAME}} | 1}} }} }}} <!-- If the page does have a language prefix, use the the contents of the parameter with that language code. -->
                                            | en <!-- If lang is empty or undefined and there is no language prefix, use the English content. -->
}}}}}.wikipedia.org/<!--
-->{{#if: {{{diff|}}}  <!-- Is there a diff parameter and a permalink should be used? -->
-->{{#if: {{{diff|}}}  <!-- Is there a diff parameter and a permalink should be used? -->
  |  <!-- Yes there is a diff parameter, use permalink -->
  |  <!-- Yes there is a diff parameter, use permalink -->