Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Uw/doc: Difference between revisions

Template page
m +link
Fix language-code links to use Wikipedia interwiki prefixes
 
(23 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{TemplateBox
{{TemplateBox
|1=1
|1=1
|1d=user name, without the trailing "~commonswiki"
|1d=user name, '''without''' the trailing "~commonswiki"
|1stat=required
|1stat=required
|2=2
|2=2
Line 7: Line 7:
|2def=param #1
|2def=param #1
|2stat=optional-
|2stat=optional-
|3=3
|3=3
|3d=specify a "t" to link to the User <u>Talk</u> page<br>''(can as well be coded with parameter 2 or parameter 4 )''
|3d={{w|List of ISO 639-1 codes|ISO 639}} language code; <small>If absent: <code>~commonswiki</code> </small>
|3def=
|3stat=optional-
|3stat=optional-
|4=4
|4=4
|4d=either a "+" sign or a "-" sign, to prefix with namespace<br>''(can as well be coded with parameter 2 or parameter 3 )''
|4d= + or -  to precede the user name with the namespace <code>{{ns:2}}:</code>
:'''+''' ("plus" sign)  to make <code>User:</code> a part of the link,
:'''-''' ("minus" sign) to precede <code>User:</code> as  plain text;<br />
(if ''both'' signs are specified, "+" is used and "-" is ignored)<br />
The +/- parameter can as well be specified with parameter 2 or 3.
|4def=
|4stat=optional-
|4stat=optional-
|name={{BASEPAGENAME}}
 
|desc=<big>User page link</big>, only within Commons, when user names are trailed with "~commonswiki"
|5=link
|5d=specify <code>link=no</code> to suppress the link
|5stat=optional-
 
|6={{0}}
|6d=<br />''more parameters to format the namespace (when "+" or "-" is specified)''
: <small>» not every possible combination of parameter values is useful «</small>
|6def={{0}}
|6stat=optional-
|7=case
|7d=for formatting of the namespace:commonswiki
* <code>case=l</code> display "{{lcfirst:{{ns:2}}}}" instead of "{{ns:2}}"
* <code>case=i</code> display the national translation, in general a link 
* <code>case=n</code> display the national translation without linking it
|7stat=optional-
|8=i18n
|8d=an {{W|ISO 630-1|ISO 639}} language code, to follow another translation then yours
:when parameter setting is <code>case=i</code> or <code>case=n</code>
|8def={{int:lang}}
|8stat=optional-
 
|name=<includeonly>{{PAGENAME}}</includeonly><noinclude>U</noinclude>
|desc=<big>User page link</big>, {{Nobold|within Commons when user names are trailed with "~commonswiki"}}<br />
{{Nobold|in other wikipedias when user names are trailed with "~××wiki" (×× for the ISO 639 language code)}}
|namespace=
|namespace=
|usergroup=
|usergroup=
Line 21: Line 51:
|i18n-method=-
|i18n-method=-
|type=
|type=
|example=Username
|example=Example
|seealso=
|seealso=
|setscats=
|setscats=
Line 28: Line 58:
|relieson=
|relieson=
}}
}}
__NOTOC__
==== More examples ====
==== More examples ====
{{Tle|t=Uw|A Obeidat|t}} gives {{Uw|A Obeidat|t}} <br>


{{Tle|t=Uw|Username|-}} gives {{Uw|Username|-}} <br>
{{Tle|t=Uw|Example}} gives {{Uw|Example}} (<code><nowiki>User:Example~commonswiki</nowiki></code>)<br />
{{Tle|t=Uw|Username|+}} gives {{Uw|Username|+}} <br>
{{Tle|t=Uw|Example||w:en}} gives {{Uw|Example||w:en}} (<code><nowiki>w:en:User:Example~enwiki</nowiki></code>)<br />
{{Tle|t=Uw|Username|t|-}} gives {{Uw|Username|t|-}} <br>
{{Tle|t=Uw|Example|-}} gives {{Uw|Example|-}} <br />
{{Tle|t=Uw|Username|none|-}} gives {{Uw|Username|none|-}} <br>
{{Tle|t=Uw|Example|+}} gives {{Uw|Example|+}} <br />
{{Tle|t=Uw|Example|commons|-}} gives {{Uw|Example|commons|-}} <br />
{{Tle|t=Uw|Example|Comm~user|-|p4=link|no}} gives {{Uw|Example|Comm~user|-|link=no}} <br />
{{Tle|t=Uw|Example|Comm~user|-|p4=link|no|p5=case|l}} gives {{Uw|Example|Comm~user|-|link=no|case=l}}<br />
{{Tle|t=Uw|User|Spain~user|w:es|-|p5=case|i|p6=i18n|es}} gives {{Uw|User|Spain~user|w:es|-|case=i|i18n=es}}


__NOTOC__
<small>{{Lua|Module:LangSwitch}}</small>
{{namespace/display|t=<includeonly>{{PAGENAME}}</includeonly><noinclude>Uw</noinclude>
|name=Example|par2=~commonswiki}}
{{clr}}
<span style="float:right" class="editsection"><nowiki>[</nowiki>{{Edit-int|Commons:Link templates/User and user talk links}} <!-- user links --><nowiki>]</nowiki></span>
{{Commons:Link templates/User and user talk links}}
{{Commons:Link templates/User and user talk links}}
<includeonly>
<includeonly>
[[Category:Username internal link templates|{{PAGENAME}}]]
[[Category:Username internal link templates|{{PAGENAME}}]]
[[Category:Typing-aid templates|{{PAGENAME}}]]
[[Category:Typing-aid templates|{{PAGENAME}}]]
</includeonly>
</includeonly>

Latest revision as of 18:45, 12 August 2026

User page link, within Commons when user names are trailed with "~commonswiki"
in other wikipedias when user names are trailed with "~××wiki" (×× for the ISO 639 language code)

Usage

{{U |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1user name, without the trailing "~commonswiki"emptyrequired
2display name (nick name): may be formattedparam #1optional
3ISO 639 language code; If absent: ~commonswiki emptyoptional
4+ or - to precede the user name with the namespace User:
+ ("plus" sign) to make User: a part of the link,
- ("minus" sign) to precede User: as plain text;

(if both signs are specified, "+" is used and "-" is ignored)

The +/- parameter can as well be specified with parameter 2 or 3.
emptyoptional
linkspecify link=no to suppress the linkemptyoptional
0
more parameters to format the namespace (when "+" or "-" is specified)
» not every possible combination of parameter values is useful «
0optional
casefor formatting of the namespace:commonswiki
  • case=l display "user" instead of "User"
  • case=i display the national translation, in general a link
  • case=n display the national translation without linking it
emptyoptional
i18nan ISO 639 language code, to follow another translation then yours
when parameter setting is case=i or case=n
enoptional

Additional information

The template is intended to be used in the following namespaces: no namespace specified

The template is intended to be used by the following user groups: no user group specified

Example

{{U|Example}}

renders as:

Localization

This template is not intended to be localized.

More examples

{{ UwExample }} gives Example (User:Example~commonswiki)
{{ UwExamplew:en }} gives Example (w:en:User:Example~enwiki)
{{ UwExample- }} gives User:Example
{{ UwExample+ }} gives User:Example
{{ UwExamplecommons- }} gives User:commons
{{ UwExampleComm~user-link = no }} gives User:‍Comm~user
{{ UwExampleComm~user-link = nocase = l }} gives user:‍Comm~user
{{ UwUserSpain~userw:es-case = ii18n = es }} gives LangSwitch Error: no default:Spain~user

Table: different displays for {{Uw}} with the namespace option 0
{{ UwExample }} 0this is the standard Example
{{ UwExample- }} User:Example
{{ UwExample-case = l }} user:Example
{{ UwExample-case = i }} LangSwitch Error: no default:Example
{{ UwExample-case = n }} user:Example
{{ UwExample+ }} User:Example
{{ UwExample+case = l }} user:Example
{{ UwExample+case = i }} user:Example
{{ UwExample+case = n }} user:Example
{{ UwExamplelink = n }} ‍Example
{{ UwExample-link = n }} User:‍Example
{{ UwExample-link = ncase = l }} user:‍Example
{{ UwExample-link = ncase = i }} LangSwitch Error: no default:‍Example
{{ UwExample-link = ncase = n }} user:‍Example
{{ UwExample+link = n }} User:‍Example
{{ UwExample+link = ncase = l }} user:‍Example
{{ UwExample+link = ncase = i }} LangSwitch Error: no default:‍Example
{{ UwExample+link = ncase = n }} user:‍Example

[edit ] {{Commons:Link templates/User and user talk links}}

Cookies help us deliver our services. By using our services, you agree to our use of cookies.