Template:Flag: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Undo revision 112360 by TheWombatGuru (talk))
(Removed migration of wrong country codes (cz and uk))
(43 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Flag|en}}{{#if: {{{1|}}} |  
<noinclude>{{Flag|en}}</noinclude>{{#if: {{{1|}}} |  
     {{#ifexist: File:Flag_{{#switch: {{lc: {{{1}}} }}
     {{#ifexist: File:Flag_{{{1}}}.png  
                              | cs = cz
         | [[File:Flag_{{{1}}}.png<!--
                              | uk = ua
        -->| {{#if: {{{size|}}}  
                              | #default = {{{1}}}
                          }}.png  
         | [[File:Flag_{{#switch: {{lc: {{{1}}} }}
                          | cs = cz
                          | uk = ua
                          | #default = {{{1}}}
                      }}.png <!--
        --> | {{#if: {{{size|}}}  
                   | {{{size}}}px  
                   | {{{size}}}px  
                   | 25px
                   | 25px
               }}  
               }}<!--
            | {{#switch: {{lc: {{{1}}} }}  
        -->| {{#switch: {{lc: {{{1}}} }}  
                   | cs | cz = Česky
                   | cs = Česky
                  | da = Dansk
                   | de = Deutsch  
                   | de = Deutsch  
                   | en = English  
                   | en = English  
                   | es = Español  
                   | es = Español  
                   | fr = Français  
                   | fr = Français  
                  | hu = Magyar nyelv
                   | it = Italiano  
                   | it = Italiano  
                  | ja = 日本語
                  | ko = 한국어
                  | ms = Bahasa Melayu
                   | nl = Nederlands  
                   | nl = Nederlands  
                  | pl = Polska
                   | pt-br = Português do Brasil  
                   | pt-br = Português do Brasil  
                  | pt-pt = Português
                   | ru = Русский  
                   | ru = Русский  
                   | uk | ua = Українська
                  | sv = Svenska
                  | tr = Turkish
                   | uk = Українська
                  | vi = Tiếng Việt
                  | zh = 中文
                   | #default = {{{1}}}
                   | #default = {{{1}}}
               }}  
               }}<!--
            | link= {{#if: {{{link|}}}  
        -->| class=flag<!--
        -->|link= {{#if: {{{link|}}}  
                         | {{#ifeq: {{{link|}}} | none  
                         | {{#ifeq: {{{link|}}} | none  
                               |
                               |
                               | {{{link}}}
                               | {{{link}}}
                           }}
                           }}
                         | {{#switch: {{lc: {{#titleparts: {{FULLPAGENAME}} | | -1 }} }}
                         | {{#switch: {{Language suffix}}
                               | cs| de | es | fr | it | nl | pt-br | ru | uk = {{#titleparts: {{FULLPAGENAME}} | -1 }}
                               | cs | da | de | es | fr | hu | it | ja | ko | ms | nl | pl | pt-br | pt-pt | ru | sv | tr | uk | vi | zh = {{#titleparts: {{FULLPAGENAME}} | -1 }}
                               | #default = {{FULLPAGENAME}}
                               | #default = {{FULLPAGENAME}}
                           }}{{#switch: {{lc: {{{1}}} }}
                           }}{{#switch: {{lc: {{{1}}} }}
                                 | en =
                                 | en =
                                | cz = /cs
                                | ua = /uk
                                 | #default = /{{{1}}}  
                                 | #default = /{{{1}}}  
                             }}
                             }}
                     }}
                     }}
         ]]  
         ]]  
         | <br><b>Country code <code>{{{1}}}</code> is not supported by the "Flag" template. Please consider adding it [http://www.factorioforums.com/wiki/index.php?title=Template:Flag&action=edit here].</b><includeonly>[[Category:Pages that link to the Flag template using unsupported country codes]]</includeonly><br>  
         | <br><includeonly><b>Country code <code>{{{1}}}</code> is not supported by the "Flag" template. Please consider adding it [http://www.factorioforums.com/wiki/index.php?title=Template:Flag&action=edit here].</b>[[Category:Pages that link to the Flag template using unsupported country codes]]</includeonly><br>  
     }}  
     }}  
     | <br><b>No country code specified! Please insert a country code into the first parameter of the "Flag" template. Example: <code><nowiki>{{Flag|de}}</nowiki></code></b><includeonly>[[Category:Pages that link to the Flag template without specifying a country codes]]</includeonly><br>  
     | <br><includeonly><b>No country code specified! Please insert a country code into the first parameter of the "Flag" template. Example: <code><nowiki>{{Flag|de}}</nowiki></code></b>[[Category:Pages that link to the Flag template without specifying a country codes]]</includeonly><br>  
}}<noinclude>
}}{{#ifeq: {{{text|}}} | yes | {{-}} {{Country name|local|{{{1}}}}} ({{Country name| {{#switch: {{Language suffix}} | cs | da | de | es | fr | hu | it | ja | ko | ms | nl | pl | pt-br | pt-pt | ru | sv | tr | uk | vi | zh = {{Language suffix}} | #default = en }} | {{{1}}} }}) <br/> }}<noinclude>
{{documentation}}
{{documentation}}
[[Category:Localisation templates]]
</noinclude>
</noinclude>

Revision as of 17:48, 7 May 2020

English

[View] [Edit] [Page history]

Documentation

Usage

{{Flag|Language code|link=Page to link to|size=Size of the flag}}

This template creates a flag for a specific country.

The following flags are supported:

  • cs - {{Flag|cs}} - Česky
  • da - {{Flag|da}} - Dansk
  • de - {{Flag|de}} - Deutsch
  • en - {{Flag|en}} - English
  • es - {{Flag|es}} - Español
  • fr - {{Flag|fr}} - Français
  • hu - {{Flag|hu}} - Magyar nyelv
  • it - {{Flag|it}} - Italiano
  • ja - {{Flag|ja}} - 日本語
  • ko - {{Flag|ko}} - 한국어
  • ms - {{Flag|ms}} - Bahasa Melayu
  • nl - {{Flag|nl}} - Nederlands
  • pt-br - {{Flag|pt-br}} - Português do Brasil
  • pt-pt - {{Flag|pt-pt}} - Português
  • ru - {{Flag|ru}} - Русский
  • sv - {{Flag|sv}} - Svenska
  • tr - {{Flag|tr}} - Turkish
  • uk - {{Flag|uk}} - Українська
  • vi - {{Flag|vi}} - Tiếng Việt
  • zh - {{Flag|zh}} - 中文
  • zh-tw - {{Flag|zh-tw}} - zh-tw
List of all templates