Difference between revisions of "Template:Multilang"

From Moondust Wiki
Jump to navigation Jump to search
(WIP)
(Can be used now.)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
'''''WORK IN PROGRESS. DO NOT USE YET.'''''
----
Links available languages at the top-right corner of a page.
Links available languages at the top-right corner of a page.


==Usage==
==Usage==


When an article has multiple translations (for example [[TheXTech]], [[TheXTech/es]] and [[TheXTech/de]]), include the following on the top of the main-page:
When an article has multiple translations (for example [[TheXTech]], [[TheXTech/es]] and [[TheXTech/de]]), include the following at the top of those:


<pre>{{Multilang
<pre>{{Multilang
Line 14: Line 10:
|de=TheXTech/de
|de=TheXTech/de
}}</pre>
}}</pre>
And the following at the top of the sub-pages:
<pre>{{:TheXTech}}</pre>


== Available Languages ==
== Available Languages ==

Latest revision as of 20:31, 21 July 2020

Links available languages at the top-right corner of a page.

Usage

When an article has multiple translations (for example TheXTech, TheXTech/es and TheXTech/de), include the following at the top of those:

{{Multilang
|en=TheXTech
|es=TheXTech/es
|de=TheXTech/de
}}

Available Languages

https://commons.wikimedia.org/wiki/Famfamfam_flag_icons

Language ID Result
English en Icons-flag-en.png
Russian ru Icons-flag-ru.png
Chinese cn Icons-flag-cn.png
Czech cz Icons-flag-cz.png
French fr Icons-flag-fr.png
German de Icons-flag-de.png
Italian it Icons-flag-it.png
Japanese jp Icons-flag-jp.png
Polish pl Icons-flag-pl.png
Portuguese pt Icons-flag-pt.png
Spanish es Icons-flag-es.png
Swedish se Icons-flag-se.png

Syntax

{{#if: {{{title|}}} | {{DISPLAYTITLE:{{{title}}}}} }}<div style="position:relative;top:-75px;margin-bottom: -40px;float:right;text-align:right;padding:2px;line-height:11px;background:#000000{{#if: {{{noborder|}}} | margin-top:5px;border:0; | border:1px solid #000000;border-bottom:0;}}">{{#if: {{{en|}}} |[[File:Icons-flag-en.png|alt=English|link={{{en}}}]]}} {{#if: {{{ru|}}} | [[File:Icons-flag-ru.png|alt=Русский|link={{{ru}}}]] }} {{#if: {{{cn|}}} | [[File:Icons-flag-cn.png|alt=中文|link={{{cn}}}]] }} {{#if: {{{es|}}} |[[File:Icons-flag-es.png|alt=Español|link={{{es}}}]]}} {{#if: {{{fr|}}} |[[File:Icons-flag-fr.png|alt=Français|link={{{fr}}}]]}} {{#if: {{{de|}}} |[[File:Icons-flag-de.png|alt=Deutsch|link={{{de}}}]]}} {{#if: {{{jp|}}} |[[File:Icons-flag-jp.png|alt=日本語|link={{{jp}}}]]}} {{#if: {{{se|}}} |[[File:Icons-flag-se.png|alt=Svenska|link={{{se}}}]]}} {{#if: {{{it|}}} |[[File:Icons-flag-it.png|alt=Italiano|link={{{it}}}]]}} {{#if: {{{pt|}}} |[[File:Icons-flag-pt.png|alt=Português|link={{{pt}}}]]}} {{#if: {{{cz|}}} |[[File:Icons-flag-cz.png|alt=Čeština|link={{{cz}}}]]}} {{#if: {{{pl|}}} |[[File:Icons-flag-pl.png|alt=Polski|link={{{pl}}}]]}}</div>