Template:Minecraft Wiki link: Difference between revisions

From EarthMC
Jump to navigation Jump to search
(Created page with "[https://minecraft.fandom.com/{{#switch:{{{3|en}}}|en=| #default={{{3}}}/}}wiki/{{{1|Minecraft}}}{{#switch:{{{3}}}|zh={{#switch:{{{4}}}|=|zh=?variant=zh|cn=?variant=zh-cn|hk=?variant=zh-hk|tw=?variant=zh-tw|#default=}}|#default=}} {{#switch:{{{2}}}|={{{1}}}| #default={{{2|{{{1|Minecraft}}}}}}}}] <noinclude> This template allows users to quickly create a hyperlink to [https://minecraft.fandom.com/wiki/ Minecraft Wiki]. It can be abbreviated as '''<nowiki>{{mcwiki link}}<...")
 
m (fix bug)
Line 1: Line 1:
[https://minecraft.fandom.com/{{#switch:{{{3|en}}}|en=| #default={{{3}}}/}}wiki/{{{1|Minecraft}}}{{#switch:{{{3}}}|zh={{#switch:{{{4}}}|=|zh=?variant=zh|cn=?variant=zh-cn|hk=?variant=zh-hk|tw=?variant=zh-tw|#default=}}|#default=}} {{#switch:{{{2}}}|={{{1}}}| #default={{{2|{{{1|Minecraft}}}}}}}}]
[https://minecraft.fandom.com/{{#switch:{{{3|en}}}|en=| #default={{{3}}}/}}wiki/{{{1|Minecraft}}}{{#switch:{{{3}}}|zh={{#switch:{{{4}}}|=|zh=?variant=zh|cn=?variant=zh-cn|hk=?variant=zh-hk|tw=?variant=zh-tw|#default=}}|#default=}} {{#switch:{{{2}}}|={{{1|Minecraft}}}| #default={{{2|{{{1|Minecraft}}}}}}}}]<noinclude><br>
<noinclude>
This template allows users to quickly create a hyperlink to [https://minecraft.fandom.com/wiki/ Minecraft Wiki].
This template allows users to quickly create a hyperlink to [https://minecraft.fandom.com/wiki/ Minecraft Wiki].


Line 113: Line 112:
{{mcwiki link|Зомби|pls don't do like this|ru|hk}}
{{mcwiki link|Зомби|pls don't do like this|ru|hk}}


''The effect of this version is the same as that of the version without parameter 4 (''<code><nowiki>{{mcwiki link|Зомби|it's an error|ru}}</nowiki></code>''), except that 3 bytes are wasted.''
''The effect of this version is the same as that of the version without parameter 4 (''<code><nowiki>{{mcwiki link|Зомби|it's an error|ru}}</nowiki></code>''), except that 3 bytes are wasted.''</noinclude>
</noinclude>

Revision as of 16:39, 29 December 2022

Minecraft
This template allows users to quickly create a hyperlink to Minecraft Wiki.

It can be abbreviated as {{mcwiki link}}.

Usage

{{Minecraft Wiki link|1|2|3|4}} or {{mcwiki link|1|2|3|4}}.

Templates Description Default
1 Required. Page name in Minecraft Wiki Minecraft
2 Optional. Displayed text. If nothing is filled in, it is the same as 1. 1
3 Optional, specify the Minecraft Wiki in a specific language, and the default is en.
The content filled in must be the abbreviation of the language name in
the following table, otherwise it is invalid.
Language Abbreviation
English en
中文 zh
日本語 ja
Čeština cs
Deutsch de
Ελληνικά el
Español es
Français fr
Magyar hu
Italiano it
한국어 ko
Nederlands nl
Polski pl
Português pt
Русский ru
ไทย th
Türkçe tr
Українська uk
en
4 Optional. It only takes effect when parameter 3 is "zh",
which is used to specify whether the page is in simplified Chinese or traditional Chinese.
The available keywords are shown in the following table.
All other characters are regarded as No characters filled by default.
Keyword Species
rowspan="2" | Do not specify any(不指定任何一种)
All other characters
zh Default, no conversion(不转换)
cn Continental Simplified(大陆简体)
hk Hong Kong Traditional(香港繁體)
tw Taiwan Traditional(台灣正體)

Example 1 - Use parameter 1 only

{{mcwiki link|zombie}}

Effect

zombie

Example 2 - Use parameter 2

{{mcwiki link|zombie|my good friend}}

Effect

my good friend

Example 3 - Use parameter 3 but not parameter 2

{{mcwiki link|좀비||ko}}

Effect

좀비Example of use of parameter 4.

Example 4 - Use all parameters except parameter 4

{{mcwiki link|ゾンビ|Zombie's Japanese Minecraft Wiki page|ja}}

Effect

Zombie's Japanese Minecraft Wiki page

Example 5 - Example of use of parameter 4

{{mcwiki link|殭屍|僵尸在台灣のMinecraft Wiki page|zh|tw}}

Effect

僵尸在台灣のMinecraft Wiki page

Example 5.1 - Parameter 3 is "zh" but parameter 4 is not used

{{mcwiki link|僵尸|Chinese Zombie|zh}}{{mcwiki link|殭屍|Not HK Zombie|zh}}←''Although parameter 1 is written in traditional characters, it still jumps to the default no conversion page due to the lack of parameter 4.''

Effect 5.1

Chinese ZombieNot HK ZombieAlthough parameter 1 is written in traditional characters, it still jumps to the default no conversion page due to the lack of parameter 4.

Example 5.2 - Error example: Parameter 4 exists but parameter 3 is not "zh"

{{mcwiki link|Зомби|it's an error|ru|hk}}

Effect 5.2

pls don't do like this

The effect of this version is the same as that of the version without parameter 4 ({{mcwiki link|Зомби|it's an error|ru}}), except that 3 bytes are wasted.