[[w:|]]


This template is for having shorter links to an English Wikipedia article when the link is identical to its label. It takes the following parameters:

  • |1=必填) – 将要链接的维基百科条目标题。
  • |2= – 待显示的文字。缺省情况下等于|1=
  • |lang= – 所在维基百科的语言代码。本词典项目默认是zh,中文(汉语)。

A similar effect can be accomplished using the pipe trick: [[w:Chicken|]] is converted to [[w:Chicken|Chicken]] during the pre-save transform, which renders as Chicken. Only one interwiki prefix can be stripped in this way. [[w:fr:Académie française|]] transforms to [[w:fr:Académie française|fr:Académie française]].

See also Template:wikipedia, which inserts a box with a link to the Wikipedia article, and has no required parameters.

举例

说明

Because of its simplicity, the template can be substituted using subst:

  • {{subst:w|William Shakespeare|Shakespeare}} gives: [[w:William Shakespeare|Shakespeare]]

However, substituting {{subst:w|The History of the Decline and Fall of the Roman Empire}} gives an unwieldy duplication of content the template is here to avoid in the first place: [[w:The History of the Decline and Fall of the Roman Empire|The History of the Decline and Fall of the Roman Empire]]

模板数据

这是用于新版可视化编辑器和其他工具的模板数据说明文件。

来自W的模板数据

This template is for having shorter links to an English Wikipedia article when the link is identical to its label. It had one mandatory parameter. There is a similar one without any mandatory parameter {{wikipedia}}

模板参数[编辑模板数据]

此模板首选参数不换行的行内格式。

参数描述类型状态
article1

Page to link on Wikipedia

示例值
Cursive script (East Asia)
单行文本必需
label2

Text displayed on the link

示例值
cursive script
单行文本推荐
language codelang

the ISO language code of the target Wikipedia.

默认值
en
示例值
es
字符串可选