Template:Uselangflags/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{Doc/subpage}} == Usage == {{autolang||zh={{:User:1416006136/Signature|create=1}}}} {{shortcut|{{tl|link=ulf}}}} {{autolang|This template is used to switch the {{Code|select=...")
 
No edit summary
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Doc/subpage}}
{{Doc/subpage}}
== Usage ==
== Usage ==
{{autolang||zh={{:User:1416006136/Signature|create=1}}}}
{{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}} 模板一起使用。}}
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. Mostly useful for previews of templates in Template namespace.
{{Note|{{Autolang|Must be [[w:ISO 639|ISO 639]] compliant!|zh=必须符合 [[w:ISO 639|ISO 639]] 标准!}}}}
<h2>{{autolang|Usage|zh=用法}}</h2>
<h3>{{autolang|Parameters|zh=参数}}</h3>
*{{param|<{{autolang|lang code|zh=语言代码}}>}} - {{autolang|''Optional:'' Specify the lang code to 1 to show the flag of the language. Only work without {{param|all-lang}}. (e.g.{{para|en|1}})|zh=''可选:''指定语言代码为 1 以显示该语言的标志。禁用 {{param|all-lang}} 参数时有效。}}
*{{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|category-en}} - {{autolang|''Optional:'' Add the page into the [[:Category:English]].|zh=''可选:''将页面添加到[[:Category:English|分类:英语]]。}}
*{{param|title}}, {{param|1}} - {{autolang|''Optional:'' The title of the page. |zh=''可选:''页面的标题。}}
<h3>{{autolang|Examples|zh=示例}}</h3>
{{Code|<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|all-lang=1|no-right-align=1}}</nowiki>}} → {{Capsule|style=2|{{ {{PAGENAME}} |all-lang=1|no-right-align=1}}}}<br>


{{Code|<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|en=1|no-right-align=1}}</nowiki>}} {{Capsule|style=2|{{ {{PAGENAME}} |en=1|no-right-align=1}} }}<br>
=== Parameters ===
* {{param|<lang code>}} - ''Optional:'' Specify the lang code to 1 to show the flag of the language. Only work without {{param|all-lang}}. (e.g.{{para|en|1}}) (hover over flags in the example section to see the lang codes)
* {{param|all-lang}} - ''Optional:'' Show all the flags of the languages.
* {{param|no-right-align}} - ''Optional:'' Make the template to be non-right-align style if it's non-zero.
* {{param|category-en}} - ''Optional:'' Add the page into the [[:Category:English]].
* {{param|title}}, {{param|1}} - ''Optional:'' The title of the page.


{{Code|<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|en=1|ca=1|de=1|zh=1|no-right-align=1}}</nowiki>}} → {{Capsule|style=2|{{ {{PAGENAME}} |en=1|ca=1|de=1|zh=1|no-right-align=1}} }}<br>
=== Examples ===
{{Code|<nowiki>{{Uselangflags|all-lang=1|no-right-align=1}}</nowiki>}} → {{Capsule|style=2|{{Uselangflags|all-lang=1|no-right-align=1}}}}<br>


<h2>{{autolang|See Also|zh=另见}}</h2>
{{Code|<nowiki>{{Uselangflags|en=1|no-right-align=1}}</nowiki>}} → {{Capsule|style=2|{{Uselangflags|en=1|no-right-align=1}} }}<br>
* {{tl2|autolang}}
 
* {{tl2|uselang}}
{{Code|<nowiki>{{Uselangflags|en=1|ca=1|de=1|zh=1|no-right-align=1}}</nowiki>}} → {{Capsule|style=2|{{Uselangflags|en=1|ca=1|de=1|zh=1|no-right-align=1}} }}<br>





Latest revision as of 11:35, 10 August 2024

Edit-copy.png
This is a documentation subpage for Template:Uselangflags.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

Usage

This template is used to switch the uselang parameter (the language of the UI) quickly to support multiple languages on one page. Mostly useful for previews of templates in Template namespace.

Parameters

  • {{{<lang code>}}} - Optional: Specify the lang code to 1 to show the flag of the language. Only work without {{{all-lang}}}. (e.g.|en=1) (hover over flags in the example section to see the lang codes)
  • {{{all-lang}}} - Optional: Show all the flags of the languages.
  • {{{no-right-align}}} - Optional: Make the template to be non-right-align style if it's non-zero.
  • {{{category-en}}} - Optional: Add the page into the Category:English.
  • {{{title}}}, {{{1}}} - Optional: The title of the page.

Examples

{{Uselangflags|all-lang=1|no-right-align=1}}

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)


{{Uselangflags|en=1|no-right-align=1}}

English (en)


{{Uselangflags|en=1|ca=1|de=1|zh=1|no-right-align=1}}

English (en)Deutsch (de)中文 (zh)