Wikipedia – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(Template creation)
 
(Add language argument)
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}|[https://en.wikipedia.org/wiki/{{{1}}} {{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}]|-Wikipedia article not defined-}}</includeonly><noinclude>
<includeonly>{{#if:{{{1|}}}|[https://{{#if:{{{3|}}}|{{{3}}}|en}}.wikipedia.org/wiki/{{{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>
Creates a [https://en.wikipedia.org/ Wikipedia] link (English version).
Creates a [https://en.wikipedia.org/wiki/Wikipedia Wikipedia] link.


== Usage ==
== Usage ==
{{<nowiki/>Wikipedia|article|text}}
{{<nowiki/>Wikipedia|article|text|lang}}
* article: article's name '''on Wikipedia''' (required)
* article: article's name '''on Wikipedia''' (required)
* text: link text (optional, ''article'' is used if not present)
* 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")


{|class="wikitable"
{|class="wikitable"
Line 20: Line 21:
| <nowiki>{{Wikipedia|ARMA_3|Arma 3}}</nowiki>
| <nowiki>{{Wikipedia|ARMA_3|Arma 3}}</nowiki>
| {{Wikipedia|ARMA_3|Arma 3}}
| {{Wikipedia|ARMA_3|Arma 3}}
|-
| <nowiki>{{Wikipedia|ARMA_III|Arma 3|fr}}</nowiki>
| {{Wikipedia|ARMA_III|Arma 3|fr}}
|}
|}



Revision as of 10:19, 18 September 2019

Creates a Wikipedia link.

Usage

{{Wikipedia|article|text|lang}}

  • article: article's name on Wikipedia (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}} Arma 3
{{Wikipedia|ARMA_III|Arma 3|fr}} Arma 3 (fr)