Wikipedia – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Inline code|" to "{{ic|")
(Fix pound sign issue)
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}|[https://{{#if:{{{3|}}}|{{{3}}}|en}}.wikipedia.org/wiki/{{#replace:{{{1}}}| |_}} {{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}{{#if:{{{3|}}}|{{#ifeq:{{{3|}}}|en||<nowiki> </nowiki>'''<span style="font-size: 0.66em; text-transform: uppercase">({{{3}}})</span>'''}}}}]|-Wikipedia article not defined-}}</includeonly><noinclude>
<includeonly>{{#if:{{{1|}}}|[https://{{#if:{{{3|}}}|{{{3}}}|en}}.wikipedia.org/wiki/{{#replace:{{{1}}}| |_}} {{#if:{{{2|}}}|<nowiki/>{{{2}}}|{{{1}}}}}{{#if:{{{3|}}}|{{#ifeq:{{{3|}}}|en||<nowiki> </nowiki>'''<span style="font-size: 0.66em; text-transform: uppercase">({{{3}}})</span>'''}}}}]|-Wikipedia article not defined-}}</includeonly><noinclude>
Creates a [https://en.wikipedia.org/wiki/Wikipedia Wikipedia] link.
Creates a [https://en.wikipedia.org/wiki/Wikipedia Wikipedia] link.


Line 27: Line 27:
| <nowiki>{{Wikipedia|ARMA_III|Arma 3|fr}}</nowiki>
| <nowiki>{{Wikipedia|ARMA_III|Arma 3|fr}}</nowiki>
| {{Wikipedia|ARMA III|Arma 3|fr}}
| {{Wikipedia|ARMA III|Arma 3|fr}}
|-
| <nowiki>{{Wikipedia|RGB|#RRGGBB}}</nowiki>
| {{Wikipedia|RGB|#RRGGBB}}
|-
| <nowiki>{{Wikipedia|ARGB|#AARRGGBB|de}}</nowiki>
| {{Wikipedia|ARGB|#AARRGGBB|de}}
|}
|}



Revision as of 17:29, 5 August 2021

Creates a Wikipedia link.

Usage

{{Wikipedia|article|text|lang}}

  • article: article's name on Wikipedia - spaces are automatically converted to underscores _ (required)
  • text: link text (optional, article is used if not present)
  • lang: Wikipedia language code on two letters: the https://{lang}.wikipedia.org/ part. (optional, default "en")
Examples
Code Result
{{Wikipedia}} -Wikipedia article not defined-
{{Wikipedia|article}} article
{{Wikipedia|ARMA 3}} ARMA 3
{{Wikipedia|ARMA_3|Arma 3}} Arma 3
{{Wikipedia|ARMA_III|Arma 3|fr}} Arma 3 (fr)
{{Wikipedia|RGB|#RRGGBB}} #RRGGBB
{{Wikipedia|ARGB|#AARRGGBB|de}} #AARRGGBB (de)