Template:Uselangflags: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
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|noborder}} - {{autolang|''Optional:'' Remove the border. Only work without {{param|no-right-align}}.|zh=''可选:''移除边框。禁用 {{param|no-right-align}} 参数时有效。}}
*{{param|transparent}} - {{autolang|''Optional:'' Make the background of the template is transparent. Only work without {{param|no-right-align}}.|zh=''可选:''使模板的背景透明。禁用 {{param|no-right-align}} 参数时有效。}}
*{{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|1}} - {{autolang|''Optional:'' The title of the page. If it is none, it will use the default title. Only work without {{param|no-right-align}}, {{param|old-right-align}}.|zh=''可选:''页面的标题。如果留空或者不使用,则使用默认标题。禁用 {{param|no-right-align}}、{{param|old-right-align}} 参数时有效。}}
*{{param|title}}, {{param|1}} - {{autolang|''Optional:'' The title of the page. |zh=''可选:''页面的标题。}}
*{{param|title}} - {{autolang|''Optional:'' Ditto, but it can be used with {{param|old-right-align}}.|zh=''可选:''同上,但可以在启用 {{param|old-right-align}} 参数的情况下使用。}}
*{{param|notitle}} - {{autolang|''Optional:'' Remove the title. Only work without {{param|no-right-align}}, {{param|old-right-align}}.|zh=''可选:''移除标题。禁用 {{param|no-right-align}}、{{param|old-right-align}} 参数时有效。}}
*{{param|old-right-align}} - {{autolang|''Optional:'' Use the old right align of {{tl2|lang}}. Only work without {{param|no-right-align}}.|zh=''可选:''使用 {{tl2|lang}} 旧版的右对齐样式。禁用 {{param|no-right-align}} 参数时有效。}}
<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>
{{Code|<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|en=1|ca=1|de=1|zh=1|old-right-align=1}}</nowiki>}} → <br>{{ {{PAGENAME}} |en=1|ca=1|de=1|zh=1|old-right-align=1}}<br>
{{Code|<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|en=1|ca=1|de=1|zh=1|noborder=1|old-right-align=1}}</nowiki>}} → <br>{{ {{PAGENAME}} |en=1|ca=1|de=1|zh=1|noborder=1|old-right-align=1}}<br>
{{Code|<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|en=1|ca=1|de=1|zh=1|noborder=1|transparent=1|old-right-align=1}}</nowiki>}} → <br>{{ {{PAGENAME}} |en=1|ca=1|de=1|zh=1|noborder=1|transparent=1|old-right-align=1}}<br>


<h2>{{autolang|See Also|zh=另见}}</h2>
<h2>{{autolang|See Also|zh=另见}}</h2>
Line 43: Line 32:




--><includeonly><onlyinclude>{{#if:{{{no-right-align|}}}||{{#if:{{{old-right-align|}}}|{{#if:{{{title|}}}|{{DISPLAYTITLE:{{{title|}}}}}}}<div style="position:relative;top:-32px;margin-bottom:-40px;float:right;padding:2px;line-height:11px;{{#if:{{{transparent|}}}||background:#262626;}}{{#if:{{{noborder|}}}|margin-top:5px;border:0;|border:1px solid #65635F;border-bottom:0;}}">|{{DISPLAYTITLE:{{{title|{{{1|}}}}}}}}<div style="justify-content:space-between;width:calc(100% + 4px);position:absolute;left:-2px;top:calc(-34px - {{{up|{{#ifeq:{{#titleparts:{{FULLPAGENAME}}|1|1}}|{{#titleparts:{{FULLPAGENAME}}|1|-1}}|0|9}}}}}px);background-color:#262626;display:flex;align-items:flex-end;flex-direction:{{Dir|ltr=row"|rtl=row-reverse" align=right}}><!--
--><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;">}}<!--
 
--><div style="flex-direction:{{Dir|ltr=row|rtl=row-reverse}};flex:auto;padding-bottom:2px;display:flex;{{Dir|ltr=margin-left:|rtl=margin-right:}}2px;min-height:36px;{{#if:{{{noline|}}}||border-bottom:1px solid #65635F;}}font-size:26px;color:white;line-height:125%;align-items:flex-end">{{#if:{{{notitle|}}}||{{#if:{{{$title|}}}|<kbd style=color:#CAC8C6>{{{$title}}}</kbd>|{{{title|{{{8|{{{7|{{{6|{{{5|{{{4|{{{3|{{{2|{{{1|{{FULLPAGENAME}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}</div><!--
 
--><div style="display:table; margin-{{Dir|ltr=right|rtl=left}}:2px; padding:1px 1px 0 1px; border-radius:3px; border-bottom-left-radius:0; border-bottom-right-radius:0; height:19px;{{#if:{{{noborder|}}}||border:1px solid #65635F;border-bottom:0}}">}}}}<!--


     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:{{{old-right-align|}}}|</div>|</div></div></div>}}}}{{#if:{{{category-en|}}}|[[Category:English]]}}</onlyinclude></includeonly>
-->{{#if:{{{no-right-align|}}}||</div></div></div>}}{{#if:{{{category-en|}}}|[[Category:English]]}}</onlyinclude></includeonly>

Revision as of 07:15, 16 June 2023

English (en)Català (ca)Čeština (cs)Deutsch (de)Esperanto (eo)Español (es)Eesti (et)Français (fr)Magyar (hu)Ελληνικά (el)Italiano (it)Nederlands (nl)Norsk (no)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Українська (uk)Svenska (sv)Türkçe (tr)日本語 (ja)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)한국어 (ko)Ქართული (ka)עברית (he)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}
Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}
Note.pngNote:
Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}

Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}

Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}

  • {{{<
Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}

>}}} -

Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}
  • {{{all-lang}}} -
Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}
  • {{{no-right-align}}} -
Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}
  • {{{category-en}}} -
Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}
  • {{{title}}}, {{{1}}} -
Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}

Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}

{{Uselangflags|all-lang=1|no-right-align=1}}
English (en)Català (ca)Čeština (cs)Deutsch (de)Esperanto (eo)Español (es)Eesti (et)Français (fr)Magyar (hu)Ελληνικά (el)Italiano (it)Nederlands (nl)Norsk (no)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Українська (uk)Svenska (sv)Türkçe (tr)日本語 (ja)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)한국어 (ko)Ქართული (ka)עברית (he)

{{Uselangflags|en=1|no-right-align=1}}
English (en)

{{Uselangflags|en=1|ca=1|de=1|zh=1|no-right-align=1}}
English (en)Català (ca)Deutsch (de)中文 (zh)

Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}