In other languages:

Template:Languages: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Undo revision 114587 by TheWombatGuru (talk))
(Displaytitle now works in Tutorial and main namespace instead of just the main namespace)
 
(50 intermediate revisions by 10 users not shown)
Line 1: Line 1:
<includeonly>{{#ifeq: {{{list|}}} | yes | |<div
<!-- Translating the title of the page using the DISPLAYTITLE magic word -->
style="background-color: #EFEFEF;
{{#switch: {{NAMESPACE}} | Tutorial | = {{DISPLAYTITLE: {{Translation| {{#titleparts: {{FULLPAGENAME}} | -1 }} }} }} }}<!--  
padding: 5px;
Add page to that language's category if the page actually exists, and only if the page is not a category itself
border-color: #ACACAC;
-->{{#ifexist: {{FULLPAGENAME}} | {{#ifeq: {{NAMESPACE}}|Category||[[Category:{{Get language name}} page]]}}}}<!--
border-width: 1px;
Automatically show flags of other language's versions of this page
border-style: solid;
--><indicator name="languages-container">
border-bottom-width: medium;
<div class="languages-container">
position: absolute;
<span class="languages-message">
right: 0;
{{Translation|In other languages:}}
top: -2.4em;
</span>
">
<span class="languages-flags">
<!--
{{Language exist|cs}}
/* Translating the message displayed next to the flag /*
{{Language exist|da}}
--><small>'''{{#switch: {{Language suffix}}
{{Language exist|de}}
              | cs = [[Category:Czech page]]V jiných jazycích
{{Language exist|en}}
              | de = [[Category:German page]]In anderen Sprachen
{{Language exist|es}}
              | es = [[Category:Spanish page]]En otros idiomas
{{Language exist|fr}}
              | fr = [[Category:French page]]Dans d'autres langues
{{Language exist|hu}}
              | it = [[Category:Italian page]]In altre lingue
{{Language exist|it}}
              | nl = [[Category:Dutch page]]In andere talen
{{Language exist|ja}}
              | pt-br = [[Category:Brazilian Portuguese page]]
{{Language exist|ko}}
              | ru = [[Category:Russian page]]Другими языками
{{Language exist|ms}}
              | uk = [[Category:Ukrainian page]]Іншими мовами
{{Language exist|nl}}
              | zh = [[Category:Chinese page]]In other languages
{{Language exist|pl}}
              | #default = [[Category:English page]]In other languages
{{Language exist|pt-br}}
          }}: '''</small> <!--
{{Language exist|pt-pt}}
/* Using manual language adding by inserting the language code in the template's parameters /*
{{Language exist|ru}}
-->}}{{#if: {{{1|}}}{{{cs|}}}{{{de|}}}{{{en|}}}{{{es|}}}{{{fr|}}}{{{it|}}}{{{nl|}}}{{{pt-br|}}}{{{ru|}}}{{{uk|}}}{{{zh|}}}
{{Language exist|sv}}
    | {{#if:{{{1|}}}|{{Flag|{{{1}}}}}}}<!--
{{Language exist|tr}}
      --> {{#if:{{{2|}}}|{{Flag|{{{2}}}}}}}<!--
{{Language exist|uk}}
      --> {{#if:{{{3|}}}|{{Flag|{{{3}}}}}}}<!--
{{Language exist|vi}}
      --> {{#if:{{{4|}}}|{{Flag|{{{4}}}}}}}<!--
{{Language exist|zh}}
      --> {{#if:{{{5|}}}|{{Flag|{{{5}}}}}}}<!--
</span>
      --> {{#if:{{{6|}}}|{{Flag|{{{6}}}}}}}<!--
</div></indicator><noinclude>
      --> {{#if:{{{7|}}}|{{Flag|{{{7}}}}}}}<!--
      --> {{#if:{{{8|}}}|{{Flag|{{{8}}}}}}}<!--
      --> {{#if:{{{9|}}}|{{Flag|{{{9}}}}}}}<!--
      --> {{#if:{{{10|}}}|{{Flag|{{{10}}}}}}}<!--
      --> {{#if:{{{11|}}}|{{Flag|{{{11}}}}}}}<!--
      --> {{#if:{{{cs|}}}|{{Flag|cs|link={{{cs}}}}}}}<!--
      --> {{#if:{{{de|}}}|{{Flag|de|link={{{de}}}}}}}<!--
      --> {{#if:{{{en|}}}|{{Flag|en|link={{{en}}}}}}}<!--
      --> {{#if:{{{es|}}}|{{Flag|es|link={{{es}}}}}}}<!--
      --> {{#if:{{{fr|}}}|{{Flag|fr|link={{{fr}}}}}}}<!--
      --> {{#if:{{{it|}}}|{{Flag|it|link={{{it}}}}}}}<!--
      --> {{#if:{{{nl|}}}|{{Flag|nl|link={{{nl}}}}}}}<!--
      --> {{#if:{{{pt-br|}}}|{{Flag|pt-br|link={{{pt-br}}}}}}}<!--
      --> {{#if:{{{ru|}}}|{{Flag|ru|link={{{ru}}}}}}}<!--
      --> {{#if:{{{uk|}}}|{{Flag|uk|link={{{uk}}}}}}}<!--
      --> {{#if:{{{zh|}}}|{{Flag|zh|link={{{zh}}}}}}}<!--
/* If no language code is inserted into the template's parameters, search for pages with the same title in other languages /*
      -->
    | {{Language exist|cs|{{{list}}}}} <!--
  -->{{Language exist|de|{{{list}}}}} <!--
  -->{{#switch: {{Language suffix}}
          | cs| de | es | fr | it | nl | pt-br | ru | uk | zh = {{#ifexist: {{#switch: {{Language suffix}}
                                                                            | cs| de | es | fr | it | nl | pt-br | ru | uk | zh = {{#titleparts: {{FULLPAGENAME}}| -1 }}
                                                                            | #default = {{FULLPAGENAME}}
                                                                        }} | {{#ifeq: {{{list|}}} | yes | {{Flag|en|text=yes}} | {{Flag|en}} }}
      }}}} <!--
  -->{{Language exist|es|{{{list}}}}} <!--
  -->{{Language exist|fr|{{{list}}}}} <!--
  -->{{Language exist|it|{{{list}}}}} <!--
  -->{{Language exist|nl|{{{list}}}}} <!--
  -->{{Language exist|pt-br|{{{list}}}}} <!--
  -->{{Language exist|ru|{{{list}}}}} <!--
  -->{{Language exist|uk|{{{list}}}}} <!--
  -->{{Language exist|zh|{{{list}}}}}}}{{#ifeq: {{{list|}}} | yes | |</div>}}</includeonly><noinclude>
 
{{documentation}}
{{documentation}}
 
[[Category:Localisation templates]] [[Category:Main]]
[[Category:Localisation templates]]
</noinclude>
</noinclude>

Latest revision as of 14:03, 2 December 2020

[View] [Edit] [Page history]

Documentation

This template has a Sandbox for testing new features at Template:Languages/Sandbox.

This template will display a bar with links to international versions of the same page.
List of all templates