Difference between revisions of "Template:Otherlang"

From Tycoon Gaming
m
m
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
 +
 
This template adds available translations for the page to the top through the use of flags.
 
This template adds 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'''.
 
To prevent issues, this template must be placed '''at the very beginning of a page'''.
 
Tip! When contributing a new translation to a document that already has other translations, please carry over the existing translations to the otherlang template of your contributed page. This way all multilingual pages are linked.
 
  
 
== Syntax ==
 
== Syntax ==
 
<pre>
 
<pre>
  {{otherlang
+
{{otherlang
  | noborder=true (OPTIONAL)
+
| noborder=true (OPTIONAL)
  | title=localized page display title
+
| lang=page:lang
  | lang=page:lang
+
| lang2=page:lang2
  | lang2=page:lang2
+
| etc...
  | etc...
+
}}
  }}
 
</pre>
 
 
 
Warning! Do not include the language of the current page. This will only confuse readers.
 
 
 
=== Example ===
 
On a page called [[Test]]:
 
 
 
<pre>
 
  {{otherlang
 
  | title=Test
 
  | de=Test:de
 
  }}
 
 
</pre>
 
</pre>
  
Note that:
+
'''Warning: Do not include the language of the current page. This will only confuse readers.'''
* The language "en" is not included, as it is the language of the page that template is being used on.
 
* title is assigned the translated name of the page, and will appear as the display title (heading) for the page. This can replace the existing {{wrongtitle}} and {{DISPLAYTITLE}} templates currently in common use.
 
* The English page has no suffix.
 
* The same template must be used on the translated page (with the other language) to link back
 
  
 
== Available Languages ==
 
== Available Languages ==
{| class="table table-bordered" border="2" cellpadding="7"
+
{| class="standard-table"
 
! Language
 
! Language
 
! Syntax
 
! Syntax
Line 43: Line 25:
 
|English
 
|English
 
|en=Page_name
 
|en=Page_name
|English
+
|[[File:En.png]]
 +
|- id="nl"
 +
|Dutch
 +
|nl=nl:Page_name
 +
|[[File:nl.png]]
 +
|- id="fr"
 +
|French
 +
|fr=fr:Page_name
 +
|[[File:Fr.png]]
 
|- id="de"
 
|- id="de"
|Deutsch
+
|German
 
|de=de:Page_name
 
|de=de:Page_name
|German
+
|[[File:De.png]]
 +
|- id="it"
 +
|Italian
 +
|it=it:Page_name
 +
|[[File:It.png]]
 
|- id="pl"
 
|- id="pl"
|Polski
 
|pl=pl:Page_name
 
 
|Polish
 
|Polish
 +
|pl=Page_name:pl
 +
|[[File:Pl.png]]
 
|- id="es"
 
|- id="es"
|Éspanol
+
|Spanish
 
|es=es:Page_name
 
|es=es:Page_name
|Spanish
+
|[[File:Es.png]]
|- id="fr"
 
|Français
 
|fr=fr:Page_name
 
|French
 
|- id="nl"
 
|Nederlands
 
|nl=nl:Page_name
 
|Dutch
 
|- id="it"
 
|Italian
 
|it=it:Page_name
 
|Italiano
 
 
|}
 
|}
</noinclude>
+
 
'''Available Languages:''' {{#if:{{{en|}}}|'''[[{{{en}}}|English]]'''}}{{#if:{{{de|}}}|'''[[{{{de}}}|German]]'''}}{{#if:{{{pl|}}}|'''[[{{{pl}}}|Polish]]'''}}{{#if:{{{es|}}}|'''[[{{{es}}}|Spanish]]'''}}{{#if:{{{fr|}}}|'''[[{{{fr}}}|French]]'''}}{{#if:{{{nl|}}}|'''[[{{{nl}}}|Dutch]]'''}}{{#if:{{{it|}}}|'''[[{{{it}}}|Italian]]'''}}
+
</noinclude>{{
 +
#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={{{en}}}]]''' }} {{
 +
#if: {{{de|}}} | [[File:De.png|alt=Deutsch|link={{{de}}}]] }} {{
 +
#if: {{{es|}}} | [[File:Es.png|alt=Español|link={{{es}}}]] }} {{
 +
#if: {{{fr|}}} | [[File:Fr.png|alt=Français|link={{{fr}}}]] }} {{
 +
#if: {{{it|}}} | [[File:It.png|alt=Italiano|link={{{it}}}]] }} {{
 +
#if: {{{nl|}}} | [[File:Nl.png|alt=Nederlands|link={{{nl}}}]] }} {{
 +
#if: {{{pl|}}} | [[File:Pl.png|alt=Polski|link={{{pl}}}]] }}</div>

Revision as of 00:27, 12 April 2020


This template adds 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)
| lang=page:lang
| lang2=page:lang2
| etc...
}}

Warning: Do not include the language of the current page. This will only confuse readers.

Available Languages

Language Syntax Result
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=Page_name:pl Pl.png
Spanish es=es:Page_name Es.png