Difference between revisions of "Template:Otherlang"

From Tycoon Gaming
m
m (making code more readable)
 
(6 intermediate revisions by one other user not shown)
Line 130: Line 130:
 
</noinclude>
 
</noinclude>
 
{{#vardefine: realBasePageName | {{#if: {{{en|}}} | {{{en}}} | {{PAGENAME}} }} }} {{
 
{{#vardefine: realBasePageName | {{#if: {{{en|}}} | {{{en}}} | {{PAGENAME}} }} }} {{
#if: {{{title|}}} | {{DISPLAYTITLE:{{{title}}}}} }}<div style="display:flex; flex-direction:row; gap:5px; position:relative; top:-32px; margin-bottom:-40px; float:right; text-align:right; padding:2px; line-height:11px; background:#262626; {{#if: {{{noborder|}}} | margin-top:5px; border:0; | border:1px solid #65635F; border-bottom:0; }}"> realBasePageName ({{#var:realBasePageName}}) exists? {{#ifexist: {{{realBasePageName}}} | yes | no }}
+
#if: {{{title|}}} | {{DISPLAYTITLE:{{{title}}}}} }}<div style="
PAGENAME ({{PAGENAME}}) exists? {{#ifexist: {{{PAGENAME}}} | yes | no }}
+
    display: flex;
<!--{{
+
    flex-direction: row;
#ifexist: {{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|{{{realBasePageName}}}| | [[File:En.png|alt=English|link={{{realBasePageName}}}]] }} }} {{
+
    gap: 2px;
#ifexist: DE:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|DE:{{{realBasePageName}}}| | [[File:De.png|alt=German|link=DE:{{{realBasePageName}}}]] }} }} {{
+
    position: relative;
#ifexist: ES:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|ES:{{{realBasePageName}}}| | [[File:Es.png|alt=Spanish|link=ES:{{{realBasePageName}}}]] }} }} {{
+
    top: -20px;
#ifexist: FR:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|FR:{{{realBasePageName}}}| | [[File:Fr.png|alt=French|link=FR:{{{realBasePageName}}}]] }} }} {{
+
    margin-bottom: -40px;
#ifexist: IT:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|IT:{{{realBasePageName}}}| | [[File:It.png|alt=Italian|link=IT:{{{realBasePageName}}}]] }} }} {{
+
    float: right;
#ifexist: NL:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|NL:{{{realBasePageName}}}| | [[File:Nl.png|alt=Dutch|link=NL:{{{realBasePageName}}}]] }} }} {{
+
    text-align: right;
#ifexist: PL:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|PL:{{{realBasePageName}}}| | [[File:Pl.png|alt=Polish|link=PL:{{{realBasePageName}}}]] }} }} {{
+
    padding: 2px;
#ifexist: RO:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|RO:{{{realBasePageName}}}| | [[File:Ro.png|alt=Romanian|link=RO:{{{realBasePageName}}}]] }} }} {{
+
    line-height: 11px;
#ifexist: PT:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|PT:{{{realBasePageName}}}| | [[File:Pt.png|alt=Portuguese|link=PT:{{{realBasePageName}}}]] }} }} {{
+
    background: #262626;
#ifexist: PT-BR:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|PT-BR:{{{realBasePageName}}| | [[File:Pt-br.png|alt=Brazilian Portuguese|link=PT-BR:{{{realBasePageName}}}]] }} }} {{
+
    border: 0;"> {{
#ifexist: TR:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|TR:{{{realBasePageName}}}| | [[File:Tr.png|alt=Turkish|link=TR:{{{realBasePageName}}}]] }} }} {{
+
#ifexist: {{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|{{#var:realBasePageName}}| | [[File:En.png|alt=English|link={{#var:realBasePageName}}]] }} }} {{
#ifexist: AR:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|AR:{{{realBasePageName}}}| | [[File:Ar.png|alt=Arabic|link=AR:{{{realBasePageName}}}]] }} }} {{
+
#ifexist: DE:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|DE:{{#var:realBasePageName}}| | [[File:De.png|alt=German|link=DE:{{#var:realBasePageName}}]] }} }} {{
#ifexist: DK:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|DK:{{{realBasePageName}}}| | [[File:Dk.png|alt=Danish|link=DK:{{{realBasePageName}}}]] }} }} {{
+
#ifexist: ES:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|ES:{{#var:realBasePageName}}| | [[File:Es.png|alt=Spanish|link=ES:{{#var:realBasePageName}}]] }} }} {{
#ifexist: CS:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|CS:{{{realBasePageName}}}| | [[File:Cs.png|alt=Czech|link=CS:{{{realBasePageName}}}]] }} }} {{
+
#ifexist: FR:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|FR:{{#var:realBasePageName}}| | [[File:Fr.png|alt=French|link=FR:{{#var:realBasePageName}}]] }} }} {{
#ifexist: RU:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|RU:{{{realBasePageName}}}| | [[File:Ru.png|alt=Russian|link=RU:{{{realBasePageName}}}]] }} }} {{
+
#ifexist: IT:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|IT:{{#var:realBasePageName}}| | [[File:It.png|alt=Italian|link=IT:{{#var:realBasePageName}}]] }} }} {{
#ifexist: HU:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|HU:{{{realBasePageName}}}| | [[File:Hu.png|alt=Hungarian|link=HU:{{{realBasePageName}}}]] }} }} {{
+
#ifexist: NL:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|NL:{{#var:realBasePageName}}| | [[File:Nl.png|alt=Dutch|link=NL:{{#var:realBasePageName}}]] }} }} {{
#ifexist: SK:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|SK:{{{realBasePageName}}}| | [[File:Sk.png|alt=Slovak|link=SK:{{{realBasePageName}}}]] }} }} {{
+
#ifexist: PL:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|PL:{{#var:realBasePageName}}| | [[File:Pl.png|alt=Polish|link=PL:{{#var:realBasePageName}}]] }} }} {{
#ifexist: ZH-CN:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|ZH-CN:{{{realBasePageName}}}| | [[File:Zh-cn.png|alt=Chinese (Simplified)|link=ZH-CN:{{{realBasePageName}}}]] }} }} {{
+
#ifexist: RO:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|RO:{{#var:realBasePageName}}| | [[File:Ro.png|alt=Romanian|link=RO:{{#var:realBasePageName}}]] }} }} {{
#ifexist: EE:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|EE:{{{realBasePageName}}}| | [[File:Ee.png|alt=Estonian|link=EE:{{{realBasePageName}}}]] }} }} {{
+
#ifexist: PT:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|PT:{{#var:realBasePageName}}| | [[File:Pt.png|alt=Portuguese|link=PT:{{#var:realBasePageName}}]] }} }} {{
#ifexist: ID:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|ID:{{{realBasePageName}}}| | [[File:Id.png|alt=Indonesian|link=ID:{{{realBasePageName}}}]] }} }} {{
+
#ifexist: PT-BR:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|PT-BR:{{{#var:realBasePageName}}| | [[File:Pt-br.png|alt=Brazilian Portuguese|link=PT-BR:{{#var:realBasePageName}}]] }} }} {{
#ifexist: LV:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|LV:{{{realBasePageName}}}| | [[File:Lv.png|alt=Latvian|link=LV:{{{realBasePageName}}}]] }} }} {{
+
#ifexist: TR:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|TR:{{#var:realBasePageName}}| | [[File:Tr.png|alt=Turkish|link=TR:{{#var:realBasePageName}}]] }} }} {{
#ifexist: HI:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|HI:{{{realBasePageName}}}| | [[File:Hi.png|alt=Hindi|link=HI:{{{realBasePageName}}}]] }} }} {{
+
#ifexist: AR:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|AR:{{#var:realBasePageName}}| | [[File:Ar.png|alt=Arabic|link=AR:{{#var:realBasePageName}}]] }} }} {{
#ifexist: BG:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|BG:{{{realBasePageName}}}| | [[File:Bg.png|alt=Bulgarian|link=BG:{{{realBasePageName}}}]] }} }} {{
+
#ifexist: DK:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|DK:{{#var:realBasePageName}}| | [[File:Dk.png|alt=Danish|link=DK:{{#var:realBasePageName}}]] }} }} {{
#ifexist: CY:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|CY:{{{realBasePageName}}}| | [[File:Cy.png|alt=Welsh|link=CY:{{{realBasePageName}}}]] }} }} {{
+
#ifexist: CS:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|CS:{{#var:realBasePageName}}| | [[File:Cs.png|alt=Czech|link=CS:{{#var:realBasePageName}}]] }} }} {{
#ifexist: JA:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|JA:{{{realBasePageName}}}| | [[File:Ja.png|alt=Japanese|link=JA:{{{realBasePageName}}}]] }} }} {{
+
#ifexist: RU:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|RU:{{#var:realBasePageName}}| | [[File:Ru.png|alt=Russian|link=RU:{{#var:realBasePageName}}]] }} }} {{
#ifexist: KR:{{{realBasePageName}}} | {{#ifeq: {{PAGENAME}}|HR:{{{realBasePageName}}}| | [[File:Kr.png|alt=Korean|link=KR:{{{realBasePageName}}}]] }} }}--></div><!--
+
#ifexist: HU:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|HU:{{#var:realBasePageName}}| | [[File:Hu.png|alt=Hungarian|link=HU:{{#var:realBasePageName}}]] }} }} {{
 +
#ifexist: SK:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|SK:{{#var:realBasePageName}}| | [[File:Sk.png|alt=Slovak|link=SK:{{#var:realBasePageName}}]] }} }} {{
 +
#ifexist: ZH-CN:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|ZH-CN:{{#var:realBasePageName}}| | [[File:Zh-cn.png|alt=Chinese (Simplified)|link=ZH-CN:{{#var:realBasePageName}}]] }} }} {{
 +
#ifexist: EE:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|EE:{{#var:realBasePageName}}| | [[File:Ee.png|alt=Estonian|link=EE:{{#var:realBasePageName}}]] }} }} {{
 +
#ifexist: ID:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|ID:{{#var:realBasePageName}}| | [[File:Id.png|alt=Indonesian|link=ID:{{#var:realBasePageName}}]] }} }} {{
 +
#ifexist: LV:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|LV:{{#var:realBasePageName}}| | [[File:Lv.png|alt=Latvian|link=LV:{{#var:realBasePageName}}]] }} }} {{
 +
#ifexist: HI:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|HI:{{#var:realBasePageName}}| | [[File:Hi.png|alt=Hindi|link=HI:{{#var:realBasePageName}}]] }} }} {{
 +
#ifexist: BG:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|BG:{{#var:realBasePageName}}| | [[File:Bg.png|alt=Bulgarian|link=BG:{{#var:realBasePageName}}]] }} }} {{
 +
#ifexist: CY:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|CY:{{#var:realBasePageName}}| | [[File:Cy.png|alt=Welsh|link=CY:{{#var:realBasePageName}}]] }} }} {{
 +
#ifexist: JA:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|JA:{{#var:realBasePageName}}| | [[File:Ja.png|alt=Japanese|link=JA:{{#var:realBasePageName}}]] }} }} {{
 +
#ifexist: KR:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|HR:{{#var:realBasePageName}}| | [[File:Kr.png|alt=Korean|link=KR:{{#var:realBasePageName}}]] }} }}</div>
 +
<!--
 +
{{#if: {{{title|}}} | {{DISPLAYTITLE:{{{title}}}}} }}<div style="position:relative;top:-32px;margin-bottom: -40px;float:right;text-align:right;padding:2px;line-height:11px;background:#262626;
 +
{{#if: {{{noborder|}}} | margin-top:5px;border:0; | border:1px solid #65635F;border-bottom:0;}}">
 
{{
 
{{
#if: {{{title|}}} | {{DISPLAYTITLE:{{{title}}}}} }}<div style="position:relative;top:-32px;margin-bottom: -40px;float:right;text-align:right;padding:2px;line-height:11px;background:#262626;{{#if: {{{noborder|}}} | margin-top:5px;border:0; | border:1px solid
+
#if: {{{en|}}} | '''[[File:En.png|alt=English|link={{#var:realBasePageName}}]]''' }} {{
#65635F;border-bottom:0;}}">{{
 
#if: {{{en|}}} | '''[[File:En.png|alt=English|link={{{realBasePageName}}}]]''' }} {{
 
 
#if: {{{de|}}} | [[File:De.png|alt=Deutsch|link={{{de}}}]] }} {{
 
#if: {{{de|}}} | [[File:De.png|alt=Deutsch|link={{{de}}}]] }} {{
 
#if: {{{es|}}} | [[File:Es.png|alt=Español|link={{{es}}}]] }} {{
 
#if: {{{es|}}} | [[File:Es.png|alt=Español|link={{{es}}}]] }} {{
Line 187: Line 198:
 
#if: {{{cy|}}} | [[File:Cy.png|alt=Welsh|link={{{cy}}}]] }} {{
 
#if: {{{cy|}}} | [[File:Cy.png|alt=Welsh|link={{{cy}}}]] }} {{
 
#if: {{{ja|}}} | [[File:Ja.png|alt=Japanese|link={{{ja}}}]] }} {{
 
#if: {{{ja|}}} | [[File:Ja.png|alt=Japanese|link={{{ja}}}]] }} {{
#if: {{{kr|}}} | [[File:Kr.png|alt=Korean|link={{{kr}}}]] }}</div>-->
+
#if: {{{kr|}}} | [[File:Kr.png|alt=Korean|link={{{kr}}}]] }}</div>
 +
-->

Latest revision as of 02:14, 13 January 2024


This template adds all available translations for the page to the top through the use of flags.

To prevent issues, this template must be placed at the very beginning of a page.

Syntax

{{otherlang
| noborder=true (OPTIONAL)
| en=PageName
| title=Alternative Title
}}

Available Languages

Language Syntax Flag
English en=Page_name En.png
Dutch nl=NL:Page_name Nl.png
French fr=FR:Page_name Fr.png
German de=DE:Page_name De.png
Italian it=IT:Page_name It.png
Polish pl=PL:Page_name Pl.png
Spanish es=ES:Page_name Es.png
Romanian ro=RO:Page_name Ro.png
Portuguese pt=PT:Page_name Pt.png
Brazilian Portuguese pt-br=PT-BR:Page_name Pt-br.png
Turkish tr=TR:Page_name Tr.png
Arabic ar=AR:Page_name Ar.png
Danish dk=DK:Page_name Dk.png
Czech cs=CS:Page_name Cs.png
Russian ru=RU:Page_name Ru.png
Hungarian hu=HU:Page_name Hu.png
Slovak sk=SK:Page_name Sk.png
Chinese (Simplified) zh-cn=ZH-CN:Page_name Zh-cn.png
Estonian ee=EE:Page_name Ee.png
Indonesian id=ID:Page_name Id.png
Latvian lv=LV:Page_name Lv.png
Hindi hi=HI:Page_name Hi.png
Bulgarian bg=BG:Page_name Bg.png
Welsh cy=CY:Page_name Cy.png
Japanese ja=JA:Page_name Ja.png
Korean kr=KR:Page_name Kr.png


Spanish