Template:LanguageBar/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(→‎See Also: Maybe?)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Stripped multipage language bar that's shown on the upper right corner of the page and uses language prefixes
{{Doc/subpage}}
This template creates a language bar that's shown on the upper right corner of the page. The language of a page is determined by language prefixes (like {{Code|Zh/}}, {{Code|Ru/}}, etc) instead of interface language. {{Note|English is the default language and English pages don't need language prefix.}}
{{important|LanguageBar should be used only on main, Category, Help and Valve Developer Community namespaces. Other namespaces don't use prefixes (see also {{T|language}})}}
 
 
This template also applies [[:Category:Translation]]. (see the category for more details)
 
 
== Parameters and Examples ==
{| class="standard-table" | style="width: 100%"
|-
! Parameter !! Description !! Example
|-
|align="center"| No Parameters || Check for various language translations for this page and create flags for them. || {{CodeBlock|<nowiki>{{LanguageBar}}</nowiki>}}
|-
|align="center"| {{Code|preset=2|{{param|title}}}} || Allows you to change the title of a page. || {{CodeBlock|<nowiki>{{LanguageBar|title=Example Title}}</nowiki>}}
|-
|align="center"| {{Code|preset=2|{{param|_}}}} || If title param is not used and not in Category namespace then SUBPAGENAME is automatically set as title which doesn't have underscores. Setting this parameter keeps the underscores. || {{CodeBlock|<nowiki>{{LanguageBar|_=1}}</nowiki>}}
|-
|}
 
 
{{Note|If you encounter {{T|lang}}, {{T|langsp}}, {{T|language subpage}} on pages rewrite them to use LanguageBar. Internally they were edited to use LanguageBar only remaining step is just rewriting them on the used pages. See categories [[:Category:TODO rewrite lang to LanguageBar]] and [[:Category:TODO rewrite langsp to LanguageBar]] }}
 
 
== See Also ==
* [[Project:Alternative Languages]]
* [[:Category:Translation]]
* [[:Category:LanguageBar translation mark settings]]
* {{T|L}}
* {{T|Language}}

Latest revision as of 10:20, 6 April 2025

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

This template creates a language bar that's shown on the upper right corner of the page. The language of a page is determined by language prefixes (like Zh/, Ru/, etc) instead of interface language.

Note.pngNote:English is the default language and English pages don't need language prefix.
Icon-Important.pngImportant:LanguageBar should be used only on main, Category, Help and Valve Developer Community namespaces. Other namespaces don't use prefixes (see also {{language}})


This template also applies Category:Translation. (see the category for more details)


Parameters and Examples

Parameter Description Example
No Parameters Check for various language translations for this page and create flags for them.
{{LanguageBar}}
{{{title}}} Allows you to change the title of a page.
{{LanguageBar|title=Example Title}}
{{{_}}} If title param is not used and not in Category namespace then SUBPAGENAME is automatically set as title which doesn't have underscores. Setting this parameter keeps the underscores.
{{LanguageBar|_=1}}


Note.pngNote:If you encounter {{lang}}, {{langsp}}, {{language subpage}} on pages rewrite them to use LanguageBar. Internally they were edited to use LanguageBar only remaining step is just rewriting them on the used pages. See categories Category:TODO rewrite lang to LanguageBar and Category:TODO rewrite langsp to LanguageBar


See Also