Template:Uselangflags: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Copied "top:calc()" from LanguageBar)
 
Line 5: Line 5:
-->{{#if:{{{no-right-align|}}}
-->{{#if:{{{no-right-align|}}}
|
|
| <div style="direction:{{text-dir|rtl=rtl}}; display:flex; gap:4px; width:calc(100% + 4px); pointer-events: none; position:absolute; z-index:100; top:calc(-{{#ifeq:{{ROOTPAGENAME}}|{{PAGENAME}}|17|26}}px - 0px); left:-4px"><div style="pointer-events: none; margin-{{text-dir|ltr=left|rtl=right}}: 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="direction:{{text-dir|rtl=rtl}}; display:flex; gap:4px; width:calc(100% + 4px); pointer-events: none; position:absolute; z-index:100; top:calc(-17px - {{#ifeq: {{ROOTPAGENAME}} | {{PAGENAME}} | 18 | 9 }}px); left:-4px"><div style="pointer-events: none; margin-{{text-dir|ltr=left|rtl=right}}: auto"><div style="height:19px; background-color:#262626; border:1px solid #65635F; border-bottom:0; border-radius:3px 3px 0 0; pointer-events: all;">
}}<!--
}}<!--



Latest revision as of 14:08, 19 March 2025

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)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

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)