Template:Uselangflags/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(2 intermediate revisions by 2 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}}}}
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}}.
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|Must be [[w:ISO 639|ISO 639]] compliant!}}
<h3>Parameters</h3>
*{{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}})
*{{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.  
<h3>Examples</h3>
{{Code|<nowiki>{{</nowiki>{{ROOTPAGENAME}}<nowiki>|all-lang=1|no-right-align=1}}</nowiki>}} → {{Capsule|style=2|{{ {{ROOTPAGENAME}} |all-lang=1|no-right-align=1}}}}<br>


{{Code|<nowiki>{{</nowiki>{{ROOTPAGENAME}}<nowiki>|en=1|no-right-align=1}}</nowiki>}} {{Capsule|style=2|{{ {{ROOTPAGENAME}} |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>{{ROOTPAGENAME}}<nowiki>|en=1|ca=1|de=1|zh=1|no-right-align=1}}</nowiki>}} → {{Capsule|style=2|{{ {{ROOTPAGENAME}} |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>See also</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)