Template:Uselangflags: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
1416006136 (talk | contribs) No edit summary |
||
Line 8: | Line 8: | ||
{{shortcut|{{tl|link=ulf}}}} | {{shortcut|{{tl|link=ulf}}}} | ||
{{autolang|This template is used to switch the {{Code|select=1|uselang}} parameter (the language of the UI) quickly to support multiple languages on one page without {{tl2|doc}} template (its purpose is like {{tl2|lang}}). Should use with {{tl2|autolang}}.|zh=本模板用于快速切换参数 {{Code|select=1|uselang}} (UI 语言) 以在单个页面上不使用 {{tl2|doc}} 模板支持多语言 (用途类似于 {{tl2|lang}})。应该与 {{tl2|autolang}} 模板一起使用。}} | {{autolang|This template is used to switch the {{Code|select=1|uselang}} parameter (the language of the UI) quickly to support multiple languages on one page without {{tl2|doc}} template (its purpose is like {{tl2|lang}}). Should use with {{tl2|autolang}}.|zh=本模板用于快速切换参数 {{Code|select=1|uselang}} (UI 语言) 以在单个页面上不使用 {{tl2|doc}} 模板支持多语言 (用途类似于 {{tl2|lang}})。应该与 {{tl2|autolang}} 模板一起使用。}} | ||
{{Note|Must be [[w:ISO 639|ISO 639]] compliant!}} | {{Note|{{Autolang|Must be [[w:ISO 639|ISO 639]] compliant!|zh=必须符合 [[w:ISO 639|ISO 639]] 标准!}}}} | ||
<h2>{{autolang|Usage|zh=用法}}</h2> | <h2>{{autolang|Usage|zh=用法}}</h2> | ||
<h3>{{autolang|Parameters|zh=参数}}</h3> | <h3>{{autolang|Parameters|zh=参数}}</h3> | ||
Line 14: | Line 14: | ||
*{{param|all-lang}} - {{autolang|''Optional:'' Show all the flags of the languages.|zh=''可选:''显示所有语言的标志。}} | *{{param|all-lang}} - {{autolang|''Optional:'' Show all the flags of the languages.|zh=''可选:''显示所有语言的标志。}} | ||
*{{param|no-right-align}} - {{autolang|''Optional:'' Make the template to be non-right-align style if it's non-zero.|zh=''可选:''如果非零,则使模板不使用右对齐样式。}} | *{{param|no-right-align}} - {{autolang|''Optional:'' Make the template to be non-right-align style if it's non-zero.|zh=''可选:''如果非零,则使模板不使用右对齐样式。}} | ||
*{{param|category-en}} - {{autolang|''Optional:'' Add the page into the [[:Category:English]].|zh=''可选:''将页面添加到[[:Category:English|分类:英语]]。}} | *{{param|category-en}} - {{autolang|''Optional:'' Add the page into the [[:Category:English]].|zh=''可选:''将页面添加到[[:Category:English|分类:英语]]。}} | ||
*{{param| | *{{param|title}}, {{param|1}} - {{autolang|''Optional:'' The title of the page. |zh=''可选:''页面的标题。}} | ||
<h3>{{autolang|Examples|zh=示例}}</h3> | <h3>{{autolang|Examples|zh=示例}}</h3> | ||
{{Code|<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|all-lang=1|no-right-align=1}}</nowiki>}} → {{Doc/PreviewBlock|padding=2px 10px 2px 10px|style=border: 1px solid rgba(255,255,255,.2); box-shadow: 0 5px 10px rgba(0,0,0,.5)|{{ {{PAGENAME}} |all-lang=1|no-right-align=1}}}}<br> | {{Code|<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|all-lang=1|no-right-align=1}}</nowiki>}} → {{Doc/PreviewBlock|padding=2px 10px 2px 10px|style=border: 1px solid rgba(255,255,255,.2); box-shadow: 0 5px 10px rgba(0,0,0,.5)|{{ {{PAGENAME}} |all-lang=1|no-right-align=1}}}}<br> | ||
Line 27: | Line 22: | ||
{{Code|<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|en=1|ca=1|de=1|zh=1|no-right-align=1}}</nowiki>}} → {{Doc/PreviewBlock|padding=2px 10px 2px 10px|style=border: 1px solid rgba(255,255,255,.2); box-shadow: 0 5px 10px rgba(0,0,0,.5)|{{ {{PAGENAME}} |en=1|ca=1|de=1|zh=1|no-right-align=1}} }}<br> | {{Code|<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|en=1|ca=1|de=1|zh=1|no-right-align=1}}</nowiki>}} → {{Doc/PreviewBlock|padding=2px 10px 2px 10px|style=border: 1px solid rgba(255,255,255,.2); box-shadow: 0 5px 10px rgba(0,0,0,.5)|{{ {{PAGENAME}} |en=1|ca=1|de=1|zh=1|no-right-align=1}} }}<br> | ||
<h2>{{autolang|See Also|zh=另见}}</h2> | <h2>{{autolang|See Also|zh=另见}}</h2> | ||
Line 43: | Line 32: | ||
--><includeonly><onlyinclude>{{#if:{{{ | --><includeonly><onlyinclude>{{#if:{{{1|}}}{{{title|}}}|{{:DISPLAYTITLE:{{{title|{{{1|}}}}}}}}}}{{#if:{{{no-right-align|}}}||<div style="display:flex; gap:4px; width:calc(100% + 4px); pointer-events: none; position:absolute; z-index:100; top:calc(-17px - 0px); left:-4px"><div style="pointer-events: none; margin-left: auto"><div style="height:19px; background-color:#262626; border:1px solid #65635F; border-bottom:0; border-radius:3px 3px 0 0; pointer-events: all;">}}<!-- | ||
Flags | Flags | ||
Line 105: | Line 90: | ||
-->{{#if:{{{all-lang|{{{he|}}}}}}|{{#ifeq:{{uselang}}|he|<span style="margin:1px; border:1px solid rgba(255,255,255,.3); padding:0 1px; border-radius:2px; background:rgba(255,255,255,.05)"><span style="position:relative;top:-1px">{{Flag|he}}</span></span>|<span style="margin:1px; padding:1px"><span style="position:relative;top:-1px">{{Flag|he|link={{fullurl:{{FULLPAGENAME}}|uselang=he}}}}</span></span>}}}}<!-- | -->{{#if:{{{all-lang|{{{he|}}}}}}|{{#ifeq:{{uselang}}|he|<span style="margin:1px; border:1px solid rgba(255,255,255,.3); padding:0 1px; border-radius:2px; background:rgba(255,255,255,.05)"><span style="position:relative;top:-1px">{{Flag|he}}</span></span>|<span style="margin:1px; padding:1px"><span style="position:relative;top:-1px">{{Flag|he|link={{fullurl:{{FULLPAGENAME}}|uselang=he}}}}</span></span>}}}}<!-- | ||
-->{{#if:{{{no-right-align|}}}| | -->{{#if:{{{no-right-align|}}}||</div></div></div>}}{{#if:{{{category-en|}}}|[[Category:English]]}}</onlyinclude></includeonly> |
Revision as of 07:15, 16 June 2023
The above documentation is transcluded from Template:Uselangflags/doc. (Edit | Page history)
Editors can experiment in this template's sandbox (edit) and testcases (create) pages.
Editors can experiment in this template's sandbox (edit) and testcases (create) pages.