Template:W/doc: Difference between revisions
More actions
m +expl |
m linkfix |
||
| Line 15: | Line 15: | ||
|3=3 | |3=3 | ||
|3d-en=language code ({{ | |3d-en=language code ({{w|List of ISO 639-1 codes|ISO 639-1}}), or sisterproject prefix | ||
|3d-de=Sprachcode ({{Wd|ISO 639}}) (z.B.: it für {{W||italienische Wikipedia|it}}), oder Präfix eines Schwesterprojekts (z.B.: d für {{W||Wikidata|d}} oder voy für {{W||Wikivoyage|voy}}) | |3d-de=Sprachcode ({{Wd|ISO 639}}) (z.B.: it für {{W||italienische Wikipedia|it}}), oder Präfix eines Schwesterprojekts (z.B.: d für {{W||Wikidata|d}} oder voy für {{W||Wikivoyage|voy}}) | ||
|3d-td-en=language code (ISO 639), or sisterproject prefix | |3d-td-en=language code (ISO 639), or sisterproject prefix | ||
| Line 23: | Line 23: | ||
|name=W | |name=W | ||
|desc-en=This is used to help create interwiki links | |desc-en=This template is used to help create interwiki links without displaying the prefix, and without the need for repetition if the page name is to display; in this case understroke characters in the page name are replaced by space characters. | ||
* The default prefix is simply <tt>w:</tt> which creates a link to the English Wikipedia. However the language can be specified in the third parameter. | * The default prefix is simply <tt>w:</tt> which creates a link to the English Wikipedia. However the language can be specified in the third parameter. | ||
|desc-de=Diese Vorlage wird verwendet, um Interwiki Links ohne Präfix zu erzeugen, und dies ohne die Wiederholung des Link-Textes, wenn dieser mit dem Zielseitennamen identisch ist. | |desc-de=Diese Vorlage wird verwendet, um Interwiki Links ohne Präfix zu erzeugen, und dies ohne die Wiederholung des Link-Textes, wenn dieser mit dem Zielseitennamen identisch ist. | ||
| Line 40: | Line 40: | ||
|seealso={{LangSwitch |de={{Tl|Ud}} und andere {{C|Interwiki link templates|Interwiki Link Vorlagen}};   <br>{{Tl|Wd}} verbindet zur deutschen {{Wd||de:Wikipedia}}<br>{{Tl|We}} verbindet zur spanischen {{We||es:Wikipedia}}<br>{{Tl|Wf}} verbindet zur französischen {{Wf||fr:Wikipédia}}<br>{{Tl|Wh}} verbindet zur ungarischen {{Wh||hu:Wikipédiá}}<br>{{Tl|Wi}} verbindet zur italienischen {{Wi||it:Wikipedia}}<br>{{Tl|Wm}} verbindet zur mazedonischen {{Wm||mk:Wikipedia}}<br>{{Tl|Wn}} verbindet zur niederländischen {{Wn||nl:Wikipedia}} |en={{Tl|Ud}} and other {{C|Interwiki link templates}};<br>{{Tl|Wd}} links to {{Wd||de:Wikipedia}}<br>{{Tl|We}} links to {{We||es:Wikipedia}}<br>{{Tl|Wf}} links to {{Wf||fr:Wikipédia}}<br>{{Tl|Wh}} links to {{Wh||hu:Wikipédiá}}<br>{{Tl|Wi}} links to {{Wi||it:Wikipedia}}<br>{{Tl|Wm}} links to {{Wm||mk:Wikipedia}}<br>{{Tl|Wn}} links to {{Wn||nl:Wikipedia}} | |seealso={{LangSwitch |de={{Tl|Ud}} und andere {{C|Interwiki link templates|Interwiki Link Vorlagen}};   <br>{{Tl|Wd}} verbindet zur deutschen {{Wd||de:Wikipedia}}<br>{{Tl|We}} verbindet zur spanischen {{We||es:Wikipedia}}<br>{{Tl|Wf}} verbindet zur französischen {{Wf||fr:Wikipédia}}<br>{{Tl|Wh}} verbindet zur ungarischen {{Wh||hu:Wikipédiá}}<br>{{Tl|Wi}} verbindet zur italienischen {{Wi||it:Wikipedia}}<br>{{Tl|Wm}} verbindet zur mazedonischen {{Wm||mk:Wikipedia}}<br>{{Tl|Wn}} verbindet zur niederländischen {{Wn||nl:Wikipedia}} |en={{Tl|Ud}} and other {{C|Interwiki link templates}};<br>{{Tl|Wd}} links to {{Wd||de:Wikipedia}}<br>{{Tl|We}} links to {{We||es:Wikipedia}}<br>{{Tl|Wf}} links to {{Wf||fr:Wikipédia}}<br>{{Tl|Wh}} links to {{Wh||hu:Wikipédiá}}<br>{{Tl|Wi}} links to {{Wi||it:Wikipedia}}<br>{{Tl|Wm}} links to {{Wm||mk:Wikipedia}}<br>{{Tl|Wn}} links to {{Wn||nl:Wikipedia}} | ||
:''the faster one can reserve "W" with a one-letter-code; e.g. "Wp" may link to {{W||pt|pt}} or {{W||pl|pl}}.'' | :''the faster one can reserve "W" with a one-letter-code; e.g. "Wp" may link to {{W||pt|pt}} or {{W||pl|pl}}.'' | ||
: | :Two templates W<sub>''x''</sub> are elsewhere in use: {{T|wa}} for {{W|Walloon language}} and {{T|wo}} for {{W|Wolof language}}, | ||
:but there are no other {{w|List of ISO 639-1 codes|language codes}} starting with "w". }} | |||
|setscats= | |setscats= | ||
|lines= | |lines= | ||
| Line 49: | Line 50: | ||
=== {{LangSwitch|de=Beispiele|eo=Kiel uzi|ru=Применение|default=Examples}} === | === {{LangSwitch|de=Beispiele|eo=Kiel uzi|ru=Применение|default=Examples}} === | ||
;{{LangSwitch|de=Alle Paramterkombinationen|default=All parameter combinations}} | ;{{LangSwitch|de=Alle Paramterkombinationen|default=All parameter combinations}} | ||
000 <nowiki>{{</nowiki>W}} → {{W}} <ref name="r">{{LangSwitch |de=Es wird empfohlen, den 2. Parameter für einen erkärenden Text zu verwenden, wie in den anderen '' Startseite '' Beispielen gezeigt wird. |en=It is recommended to use parameter #2 giving an explaining text, as shown in the | 000 <nowiki>{{</nowiki>W}} → {{W}} <ref name="r">{{LangSwitch |de=Es wird empfohlen, den 2. Parameter für einen erkärenden Text zu verwenden, wie in den anderen '' Startseite '' Beispielen gezeigt wird. |en=It is recommended to use parameter #2 giving an explaining text, as shown in the “023” ''Main Page'' examples.}}</ref> | ||
003 <nowiki>{{</nowiki>W|3=es}} → {{W|3=es}} <ref name="r"/><br> | 003 <nowiki>{{</nowiki>W|3=es}} → {{W|3=es}} <ref name="r"/> {{F|Arrow facing left - Green.svg|Z|24}} {{T|We}}<br> | ||
003 <nowiki>{{</nowiki>W|3=pt}} → {{W|3=pt}} <ref name="r"/> | 003 <nowiki>{{</nowiki>W|3=pt}} → {{W|3=pt}} <ref name="r"/> | ||
| Line 57: | Line 58: | ||
020 <nowiki>{{</nowiki>W||en:Main Page}} → {{w||en:Main Page}} | 020 <nowiki>{{</nowiki>W||en:Main Page}} → {{w||en:Main Page}} | ||
023 <nowiki>{{</nowiki>W||Ĉefpaĝo|eo}} → {{w||Ĉefpaĝo|eo}} | 023 <nowiki>{{</nowiki>W||Ĉefpaĝo|eo}} → {{w||Ĉefpaĝo|eo}}<br> | ||
023 <nowiki>{{</nowiki>W||pt:Wikipedia|pt}} → {{W||pt:Wikipedia|pt}}<br> | |||
023 <nowiki>{{</nowiki>W||pt:Wp|pt}} → '''{{W||pt:Wp|pt}}''' (preferred style of a link to a national mainpage)<br> | |||
023 <nowiki>{{</nowiki>W||de:Wp|de}} → {{W||de:Wp|de}} {{F|Arrow facing left - Green.svg|Z|24}} {{T|Wd}}: {{Tle|t=Wd| | de:Wp}} | |||
100 <nowiki>{{</nowiki>W|Page name}} → {{w|Page name}} | 100 <nowiki>{{</nowiki>W|Page name}} → {{w|Page name}} | ||
103 <nowiki>{{</nowiki>W|Page name||it}} → {{w|Page name||it}}<br> | 103 <nowiki>{{</nowiki>W|Page name||it}} → {{w|Page name||it}} {{F|Arrow facing left - Green.svg|Z|24}} {{T|Wi}}<br> | ||
103 <nowiki>{{</nowiki>W|Page name||fr}} → {{w|Page name||fr}}<br> | 103 <nowiki>{{</nowiki>W|Page name||fr}} → {{w|Page name||fr}} {{F|Arrow facing left - Green.svg|Z|24}} {{T|Wf}}<br> | ||
103 <nowiki>{{W|{{FULLPAGENAME}}|3=pl}}</nowiki> → {{W|{{FULLPAGENAME}}||pl}}<br> | 103 <nowiki>{{W|{{FULLPAGENAME}}|3=pl}}</nowiki> → {{W|{{FULLPAGENAME}}||pl}}<br> | ||
120 <nowiki>{{</nowiki>W|Page name|Display name}} → {{w|Page name|Display name}} | 120 <nowiki>{{</nowiki>W|Page name|Display name}} → {{w|Page name|Display name}} | ||
123 <nowiki>{{</nowiki>W|Page name|Display name|nl}} → {{w|Page name|Display name|nl}}<br> | 123 <nowiki>{{</nowiki>W|Page name|Display name|nl}} → {{w|Page name|Display name|nl}} {{F|Arrow facing left - Green.svg|Z|24}} {{T|Wn}}<br> | ||
123 <nowiki>{{</nowiki>W|Page name|Display name|hu}} → {{w|Page name|Display name|hu}} | 123 <nowiki>{{</nowiki>W|Page name|Display name|hu}} → {{w|Page name|Display name|hu}} {{F|Arrow facing left - Green.svg|Z|24}} {{T|Wh}} | ||
<references/> | <references/> | ||
| Line 76: | Line 79: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
|3=de || de:Wikipedia || {{W|Benutzer Diskussion: | |3=de || de:Wikipedia || {{W|Benutzer Diskussion:Andreas_06/Spielwiese/Stadien_der_Fußball-Bundesliga|3=de}} | ||
|- | |- | ||
|3=fr || fr:Wikipédia || {{W|Discussion aide:Catégorie/Archive3#Appels à volontaires pour Aide à la conception de l'arborescence|3=fr}} | |3=fr || fr:Wikipédia || {{W|Discussion aide:Catégorie/Archive3#Appels à volontaires pour Aide à la conception de l'arborescence|3=fr}} | ||
Revision as of 07:52, 2 November 2016
This template is used to help create interwiki links without displaying the prefix, and without the need for repetition if the page name is to display; in this case understroke characters in the page name are replaced by space characters.
- The default prefix is simply w: which creates a link to the English Wikipedia. However the language can be specified in the third parameter.
Usage
{{W |1= |2= |3= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | page name; also specific [sub]pages (e.g: user, category, talk, ...) | main page of the wiki | required | |
2 | display text | parameter #1 | optional | |
3 | language code (ISO 639-1), or sisterproject prefix | en | optional | |
|
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard. Existing template documentation Newly created template documentation and imports Wikipedia's help about TemplateData • Commons-specific information This template is used to help create interwiki links without displaying the prefix, and without the need for repetition if the page name is to display; in this case understroke characters in the page name are replaced by space characters.
| ||||||||||||||||||||
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: all users
See also
{{Ud}} and other Interwiki link templates;
{{Wd}} links to de:Wikipedia
{{We}} links to es:Wikipedia
{{Wf}} links to fr:Wikipédia
{{Wh}} links to hu:Wikipédiá
{{Wi}} links to it:Wikipedia
{{Wm}} links to mk:Wikipedia
{{Wn}} links to nl:Wikipedia
- the faster one can reserve "W" with a one-letter-code; e.g. "Wp" may link to pt or pl.
- Two templates Wx are elsewhere in use: {{Wa}} for Walloon language and {{Wo}} for Wolof language,
- but there are no other language codes starting with "w".
Localization
This template is not intended to be localized.
Examples
- All parameter combinations
003 {{W|3=es}} → Wikipedia [1] {{We}}
003 {{W|3=pt}} → Wikipedia [1]
020 {{W||Main Page}} → Main Page
020 {{W||en:Main Page}} → en:Main Page
023 {{W||Ĉefpaĝo|eo}} → Ĉefpaĝo
023 {{W||pt:Wikipedia|pt}} → pt:Wikipedia
023 {{W||pt:Wp|pt}} → pt:Wp (preferred style of a link to a national mainpage)
023 {{W||de:Wp|de}} → de:Wp {{Wd}}: {{ Wd | | de:Wp }}
100 {{W|Page name}} → Page name
103 {{W|Page name||it}} → Page name {{Wi}}
103 {{W|Page name||fr}} → Page name {{Wf}}
103 {{W|{{FULLPAGENAME}}|3=pl}} → Template:W/doc
120 {{W|Page name|Display name}} → Display name
123 {{W|Page name|Display name|nl}} → Display name {{Wn}}
123 {{W|Page name|Display name|hu}} → Display name {{Wh}}
- Complex page name examples
| 3=de | de:Wikipedia | Benutzer Diskussion:Andreas_06/Spielwiese/Stadien_der_Fußball-Bundesliga |
| 3=fr | fr:Wikipédia | Discussion aide:Catégorie/Archive3#Appels à volontaires pour Aide à la conception de l'arborescence |
| 3=yi | yi:Wikipedia | ענדערן הילף:אינהאלט |
| 3=pt | pt:Wikipedia | Categoria:Cidades fantasmas da Califórnia • Predefinição Discussão:!Info pessoal |
| 3= | en:Wikipedia | Template talk:Welcome/fr#Pas assez informatif |
| 3=nl:b | nl:Wikibooks | Scalable Vector Graphics/Stijl |
| 3=en:d | en:Wikidata | Project chat |
| 3=en:n | en:Wikinews | Egyptian MP calls for web porn ban |
| 3=fi:q | fi:Wikiquote | Elizabeth II |
| 3=es:s | es:Wikisource | Archivo:Las Maravillas Del Cielo pg 7.jpg |
| 3=sv:v | sv:Wikiversity | Surdegsbakning för hemmabagaren |
| 3=pl:voy | pl:Wikivoyage | San Francisco |
| 3=lt:wikt | lt:Wiktionary | Sąrašas:Kinų hieroglifų raktai |
| 3=m | Metawiki | VisualEditor/Newsletter/2014/November/ka |
| 3=mw | Mediawiki | Extension:ParserFunctions/it |
| 3=species | Wikispecies | Verrucaria halizoa |
| 3=en:commons | en:Commons | Template:W |