Difference between revisions of "Template:Otherlang"
From Tycoon Gaming
m |
BelgianCat (talk | contribs) m (making code more readable) |
||
(2 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: | + | #if: {{{title|}}} | {{DISPLAYTITLE:{{{title}}}}} }}<div style=" |
+ | display: flex; | ||
+ | flex-direction: row; | ||
+ | gap: 2px; | ||
+ | position: relative; | ||
+ | top: -20px; | ||
+ | margin-bottom: -40px; | ||
+ | float: right; | ||
+ | text-align: right; | ||
+ | padding: 2px; | ||
+ | line-height: 11px; | ||
+ | background: #262626; | ||
+ | border: 0;"> {{ | ||
#ifexist: {{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|{{#var:realBasePageName}}| | [[File:En.png|alt=English|link={{#var:realBasePageName}}]] }} }} {{ | #ifexist: {{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|{{#var:realBasePageName}}| | [[File:En.png|alt=English|link={{#var:realBasePageName}}]] }} }} {{ | ||
#ifexist: DE:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|DE:{{#var:realBasePageName}}| | [[File:De.png|alt=German|link=DE:{{#var:realBasePageName}}]] }} }} {{ | #ifexist: DE:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|DE:{{#var:realBasePageName}}| | [[File:De.png|alt=German|link=DE:{{#var:realBasePageName}}]] }} }} {{ | ||
Line 156: | Line 168: | ||
#ifexist: CY:{{#var:realBasePageName}} | {{#ifeq: {{PAGENAME}}|CY:{{#var:realBasePageName}}| | [[File:Cy.png|alt=Welsh|link=CY:{{#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: 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}}]] }} }} | + | #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: {{{en|}}} | '''[[File:En.png|alt=English|link={{#var:realBasePageName}}]]''' }} {{ | #if: {{{en|}}} | '''[[File:En.png|alt=English|link={{#var:realBasePageName}}]]''' }} {{ | ||
#if: {{{de|}}} | [[File:De.png|alt=Deutsch|link={{{de}}}]] }} {{ | #if: {{{de|}}} | [[File:De.png|alt=Deutsch|link={{{de}}}]] }} {{ | ||
Line 185: | 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