Template:Languages: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>
<!-- Translating the title of the page using the DISPLAYTITLE magic word -->
<!--
{{#ifeq: {{NAMESPACE}}||{{DISPLAYTITLE: {{Translation| {{FULLPAGENAME}} }} }} }}
/* Translating the title of the page using the DISPLAYTITLE magic word /*
<!-- Add page to that language's category -->
-->
[[Category:{{Get language name}} page]]
{{#ifeq: {{NAMESPACE}}||{{DISPLAYTITLE: {{Translation| {{No mod prefix| {{FULLPAGENAME}} }} }} }} }}
<!-- Automatically show flags of other language's versions of this page -->
<!--
<div class="languages-container">
/* Adding the page to the correct language category /*
<span class="languages-message">
-->{{#ifeq: {{#explode: {{FULLPAGENAME}} | | -1 }} | page | |{{#switch: {{Language suffix}}
{{Translation|In other languages:}}
              | cs = [[Category:Czech page]]
</span>
              | de = [[Category:German page]]
{{Language exist|cs}}
              | es = [[Category:Spanish page]]
{{Language exist|de}}
              | fr = [[Category:French page]]
{{Language exist|en}}
              | it = [[Category:Italian page]]
{{Language exist|es}}
              | ja = [[Category:Japanese page]]
{{Language exist|fr}}
              | nl = [[Category:Dutch page]]
{{Language exist|it}}
              | pl = [[Category:Polish page]]
{{Language exist|ja}}
              | pt-br = [[Category:Brazilian Portuguese page]]
{{Language exist|nl}}
              | ru = [[Category:Russian page]]
{{Language exist|pl}}
              | sv = [[Category:Swedish page]]
{{Language exist|pt-br}}
              | uk = [[Category:Ukrainian page]]
{{Language exist|ru}}
              | zh = [[Category:Chinese page]]
{{Language exist|sv}}
              | #default = [[Category:English page]]
{{Language exist|uk}}
}}}}{{#ifeq: {{#expr: {{#if: {{{1|}}} | 1 | 0 }} + {{#if: {{{cs|}}} | 1 | 0 }} + {{#if: {{{de|}}} | 1 | 0 }} + {{#if: {{{es|}}} | 1 | 0 }} + {{#if: {{{fr|}}} | 1 | 0 }} + {{#if: {{{it|}}} | 1 | 0 }} + {{#if: {{{ja|}}} | 1 | 0 }} + {{#if: {{{nl|}}} | 1 | 0 }} + {{#if: {{{pl|}}} | 1 | 0 }} + {{#if: {{{pt-br|}}} | 1 | 0 }} + {{#if: {{{ru|}}} | 1 | 0 }} + {{#if: {{{sv|}}} | 1 | 0 }} + {{#if: {{{uk|}}} | 1 | 0 }} + {{#if: {{{zh|}}} | 1 | 0 }} + {{Other test|cs}}+{{Other test|de}}+{{Other test|es}}+{{Other test|fr}}+{{Other test|it}}+{{Other test|ja}}+{{Other test|nl}}+{{Other test|pl}}+{{Other test|pt-br}}+{{Other test|ru}}+{{Other test|sv}}+{{Other test|uk}}+{{Other test|zh}}+{{#ifeq: {{No language suffix}} | {{FULLPAGENAME}} | 0 | {{#ifexist: {{No language suffix}} | 1 | 0 }} }}
{{Language exist|zh}}
}} | 0 | |{{#ifeq: {{{list|}}} | yes | |<div
</div><noinclude>
style="background-color: #EFEFEF;
padding: 5px;
border-color: #ACACAC;
border-width: 1px;
border-style: solid;
border-bottom-width: medium;
position: absolute;
right: 0;
top: -2.4em;
"><!--
/* Translating the message displayed next to the flag /*
--><small>'''{{#switch: {{Language suffix}}
              | cs = V jiných jazycích
              | de = In anderen Sprachen
              | es = En otros idiomas
              | fr = Dans d'autres langues
              | it = In altre lingue
              | ja = In other languages
              | nl = In andere talen
              | pl = W innych językach
              | pt-br = Em outras línguas
              | ru = На других языках
              | sv = På andra språk
              | uk = Іншими мовами
              | zh = 其他语言
              | #default = In other languages
          }}: '''</small> <!--
/* Using manual language adding by inserting the language code in the template's parameters /*
-->}}{{#if: {{{1|}}}{{{cs|}}}{{{de|}}}{{{en|}}}{{{es|}}}{{{fr|}}}{{{it|}}}{{{ja|}}}{{{nl|}}}{{{pl|}}}{{{pt-br|}}}{{{ru|}}}{{{sv|}}}{{{uk|}}}{{{zh|}}}
    | {{#if:{{{1|}}}|{{Flag|{{{1}}}}}}}<!--
      --> {{#if:{{{2|}}}|{{Flag|{{{2}}}}}}}<!--
      --> {{#if:{{{3|}}}|{{Flag|{{{3}}}}}}}<!--
      --> {{#if:{{{4|}}}|{{Flag|{{{4}}}}}}}<!--
      --> {{#if:{{{5|}}}|{{Flag|{{{5}}}}}}}<!--
      --> {{#if:{{{6|}}}|{{Flag|{{{6}}}}}}}<!--
      --> {{#if:{{{7|}}}|{{Flag|{{{7}}}}}}}<!--
      --> {{#if:{{{8|}}}|{{Flag|{{{8}}}}}}}<!--
      --> {{#if:{{{9|}}}|{{Flag|{{{9}}}}}}}<!--
      --> {{#if:{{{10|}}}|{{Flag|{{{10}}}}}}}<!--
      --> {{#if:{{{11|}}}|{{Flag|{{{11}}}}}}}<!--
      --> {{#if:{{{12|}}}|{{Flag|{{{12}}}}}}}<!--
      --> {{#if:{{{13|}}}|{{Flag|{{{13}}}}}}}<!--
      --> {{#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:{{{ja|}}}|{{Flag|ja|link={{{ja}}}}}}}<!--
      --> {{#if:{{{nl|}}}|{{Flag|nl|link={{{nl}}}}}}}<!--
      --> {{#if:{{{pl|}}}|{{Flag|pl|link={{{pl}}}}}}}<!--
      --> {{#if:{{{pt-br|}}}|{{Flag|pt-br|link={{{pt-br}}}}}}}<!--
      --> {{#if:{{{ru|}}}|{{Flag|ru|link={{{ru}}}}}}}<!--
      --> {{#if:{{{sv|}}}|{{Flag|sv|link={{{sv}}}}}}}<!--
      --> {{#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 | ja | nl | pl | pt-br | ru | sv | uk | zh = {{#ifexist: {{#switch: {{Language suffix}}
                                                                                        | cs| de | es | fr | it | ja | nl | pl | pt-br | ru | sv | 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|ja|{{{list}}}}} <!--
  -->{{Language exist|nl|{{{list}}}}} <!--
  -->{{Language exist|pl|{{{list}}}}} <!--
  -->{{Language exist|pt-br|{{{list}}}}} <!--
  -->{{Language exist|ru|{{{list}}}}} <!--
  -->{{Language exist|sv|{{{list}}}}} <!--
  -->{{Language exist|uk|{{{list}}}}} <!--
  -->{{Language exist|zh|{{{list}}}}}}}{{#ifeq: {{{list|}}} | yes | |</div>}}
}}<!--
Check if a page exists in another language than English, but not in English itself. If so, put that page in a tracking category.
-->{{#switch: {{language suffix}} | cs | de | es | fr | it | ja | nl | pl | pt-br | ru | sv | uk | zh = {{#ifexist: {{#titleparts: {{FULLPAGENAME}} | -1 }} |  | [[Category:No associated English page]] }} }}</includeonly><noinclude>


{{documentation}}
{{documentation}}

Revision as of 19:42, 19 October 2016

In other languages:

[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