This version is approved.
No categories assigned
Translate
-
- Last edited 4 years ago by MLR
-
-
- This page is approved
< Manual:Template | Example
Revision as of 15:17, 29 May 2020 by Mlink-rodrigue (talk | contribs)
If you maintain different language versions as subpages on a single wiki, you can use a template to show country flags anywhere on the page to switch between the different language versions.
To switch from an English main page to its German subpage, you can use the following template.
{{#if: {{{1|}}}| {{DISPLAYTITLE:{{{1}}} }} |}}
<div>
{{#switch: {{SUBPAGENAME}}
|de=[[File:De-active.png|link=]] [[File:En.png|link={{NAMESPACE}}:{{BASEPAGENAME}}]]
|[[File:De.png|link={{ARTICLEPAGENAME}}/de]] [[File:En-active.png|link=]]
}}
</div>
<br /><br />
On the English main page and the German subpage, include the template reference with the main page name in source editing mode at the top of the pages:
{{Translate|Pagename_here}}
The page switch then inserts the links as language flags:
You can download the images here and upload them to the main namespace on your wiki: