In other languages:

Template:Languages: Difference between revisions

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

Latest revision as of 09:54, 26 April 2024

[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