Template:User x: Difference between revisions

Content deleted Content added
Hyacinth (talk | contribs)
m Reverted edits by Hyacinth (talk) to last version by ShakespeareFan00
Merging from /doc subpage
Line 1:
{{Documentation subpage|multiple templates located in [[:Category:Language user templates]]}}
{{userbox documentation subpage}}
{{lua|Module:ISO 639 name}}
<!-- Categories go inat the documentationbottom of this page and interwikis go in Wikidata. -->
 
== Usage ==
*'''DO NOT''' copy the source of this userbox. Otherwise you risk putting your userpage in a miscategorization, and/or generating duplicate templates/userboxes.
*Put this userbox on your userpage like this: {{[[Template:{{BASEPAGENAME}}|{{BASEPAGENAME}}]]}}
*Put this userbox in Babel like this: <nowiki>{{Babel|</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki>
*{{#ifexist:Template:ISO{{BASEPAGENAME}}-f|For 639the namefemale version, see: {{Str righttl|{{BASEPAGENAME}}|5-f}}.
*}}This template will automatically add your page to the following categories:
**{{#ifexist:Category:{{BASEPAGENAME}}-{{#ifexist:{{{1|}}}|{{{1|}}}|N}}|[[:Category:{{BASEPAGENAME}}]]}}
|**{{Str right|#ifexist:Category:{{BASEPAGENAME}}|5}}-N
|[[:Category:{{BASEPAGENAME}}-N]]
|{{#ifexist:Category:{{BASEPAGENAME}}
|[[:Category:{{BASEPAGENAME}}]]
|{{#ifexist:Category:{{Str crop|{{BASEPAGENAME}}|2}}
|[[:Category:{{Str crop|{{BASEPAGENAME}}|2}}]]
|[[:Category:Wikipedians by language]]
}}
}}
}}
 
==See also==
Line 15 ⟶ 26:
 
{{languages
|1={{#if:{{#invoke:ISO 639 name| {{Str cropiso_639_name_exists|{{Str right|{{BASEPAGENAME}}|5}}|2}} <noinclude>en</noinclude> }}
|1=
|{{#invoke:ISO 639 name|iso_639_name| {{#invoke:string|match|s={{BASEPAGENAME}}|pattern=%a%a%a?|start=5 |plain=false|nomatch=mis}} }} <!-- extract 639 code from BASEPAGENAME; User st-0 is malformed ietf tag -->
{{#ifexist:Template:ISO 639 name {{Str right|{{BASEPAGENAME}}|5}}
|{{#invoke:ISO 639 name|iso_639_name| {{Str crop|{{Str right|{{BASEPAGENAME}}|5}}|2}} <noinclude>en</noinclude> }}
|{{ISO 639 name| {{Str crop|{{Str right|{{BASEPAGENAME}}|5}}|2}} <noinclude>en</noinclude> }}
}}
|2={{#ifexistif:Template{{#invoke:ISO 639 name |iso_639_name_exists|{{Str right|{{BASEPAGENAME}}|5}}}}
|{{#invoke:string|match|s={{BASEPAGENAME}}|pattern=%a%a%a?|start=5 |plain=false|nomatch=mis}} <!-- extract 639 code from BASEPAGENAME; prevents malformed wikilinks -->
|{{Str right|{{BASEPAGENAME}}|5}}
|{{Str crop|{{Str right|{{BASEPAGENAME}}|5}}|2}} <noinclude>en</noinclude> }}
|level=6
|level={{#ifexist:{{{1|}}}|{{{1|}}}|N}}
|sections={{#ifexistif:Template{{#invoke:ISO 639 name |iso_639_name_exists|{{Str right|{{BASEPAGENAME}}|5}}}}
|{{Str right|{{BASEPAGENAME}}|5}}
|{{Str crop|{{Str right|{{BASEPAGENAME}}|5}}|2}} <noinclude>en</noinclude> }}
}}
<includeonly>
{{#ifexist:Category:User templates {{Str right|{{BASEPAGENAME}}|5}}-{{#ifexist:{{{1|}}}|{{{1|}}}|N}}
|[[Category:User templates {{BASEPAGENAME}}-N|{{Str right|{{BASEPAGENAME}}|5}}-{{#ifexist:{{{1|}}}|{{{1|}}}|N}}]]
|{{#ifexist:Category:{{BASEPAGENAME}}
|[[Category:{{BASEPAGENAME}}|{{Str right|{{BASEPAGENAME}}|5}}]]
|{{#ifexist:Category:{{Str crop|{{BASEPAGENAME}}|2}}
|[[Category:{{Str crop|{{BASEPAGENAME}}|2}}|{{Str crop|{{Str right|{{BASEPAGENAME}}|5}}|2}}]]
|[[Category:Wikipedians by language|{{Str right|{{BASEPAGENAME}}|5}}]]
}}
}}
}}
{{#ifexist:Category:User templates {{Str right|{{BASEPAGENAME}}|5}}-N
|[[Category:User templates {{Str right|{{BASEPAGENAME}}|5}}-N|{{Str right|{{BASEPAGENAME}}|5}}-N]]
|{{#ifexist:Category:User templates {{Str right|{{BASEPAGENAME}}|5}}
|[[Category:User templates {{Str right|{{BASEPAGENAME}}|5}}|{{Str right|{{BASEPAGENAME}}|5}}]]
|{{#ifexist:Category:User templates {{Str crop|{{Str right|{{BASEPAGENAME}}|5}}|2}}
|[[Category:User templates {{Str crop|{{Str right|{{BASEPAGENAME}}|5}}|2}}|{{Str crop|{{Str right|{{BASEPAGENAME}}|5}}|2}}]]
|[[Category:Language user templates|{{Str right|{{BASEPAGENAME}}|5}}]]
}}
}}
}}</includeonly><noinclude>
<!--!!!DOCUMENTATION FOR THIS TEMPLATE BEGINS HERE!!!-->
__NOTOC__
----
 
==Usage==
''This template is intended to provide one easy and consistent documentation for all {{ordinal|{{#ifexist:{{{1|}}}|{{{1|}}}|N}}}} level ({{#ifexist:{{{1|}}}|{{{1|}}}|N}}) "User x" templates (such as [[:Template:User tr{{#if:{{{1|}}}|-{{{1}}}|}}]]).'' It is intended '''only''' for templates with [[ISO 639]] language codes.
 
To use this on most templates use: <code><nowiki>{{documentation|Template:User x</nowiki>{{#if:{{{1|}}}|-{{{1}}}|}}<nowiki>/doc}}</nowiki></code>
 
It currently appears that some templates use {{tl|Userbox}} and some use {{tl|Userbox-level}}.
 
==See also==
*[[meta:List of Wikipedias|meta:Complete list of language wikis available]]
*{{tl|User x/doc}}
 
<!-- Categories go here and interwikis go in Wikidata. -->
</noinclude>