Template:LanguageBar: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(site upgrade)
No edit summary
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{High-use}}
{{High-use}}
{{Documentation}}
{{Documentation}}
<includeonly>
<onlyinclude><!--
<onlyinclude><!--


Line 19: Line 21:
-->{{LanguageBar/foreach
-->{{LanguageBar/foreach
| 1 = LanguageBar/flagline
| 1 = LanguageBar/flagline
| 2 = {{{base|{{LanguageBar/basepage}}}}}
| 2 = {{{base|{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}{{LanguageBar/basepage}}}}}
| separator =
| separator =
}}{{#switch: {{NAMESPACENUMBER}}
}}{{#switch: {{NAMESPACENUMBER}}
Line 27: Line 29:
-->{{LanguageBar/foreach
-->{{LanguageBar/foreach
| 1 = LanguageBar/flaglineinvert
| 1 = LanguageBar/flaglineinvert
| 2 = {{{base|{{LanguageBar/basepage}}}}}
| 2 = {{{base|{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}{{LanguageBar/basepage}}}}}
| separator =
| separator =
}}<span style="margin:1px; border:1px solid transparent"><span style="user-select:none; position:relative; top:-1px">{{Flag
}}<span style="margin:1px; border:1px solid transparent"><span style="user-select:none; position:relative; top:-1px">{{Flag|1=TranslationMark
| link = {{fullurl:Template:TranslationMark/{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}{{LanguageBar/basepage}}|action=edit&preload=Template:TranslationMark/preload&preloadparams{{urlencode:[]}}={{urlencode:{{NAMESPACEE}}}}&preloadparams{{urlencode:[]}}={{urlencode:{{LanguageBar/basepage}}}}}}
| link = {{fullurl:Template:TranslationMark/{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}{{LanguageBar/basepage}}|action=edit&preload=Template:TranslationMark/preload&preloadparams{{urlencode:[]}}={{urlencode:{{NAMESPACEE}}}}&preloadparams{{urlencode:[]}}={{urlencode:{{LanguageBar/basepage}}}}}}
}}</span></span><span style="margin:1px; border:1px solid transparent"><span style="user-select:none; position:relative; top:-1px">{{Flag|white-i| link = Valve Developer Community:Alternative_Languages}}</span></span>
}}</span></span><span style="margin:1px; border:1px solid transparent"><span style="user-select:none; position:relative; top:-1px">{{Flag|white-i| link = Valve Developer Community:Alternative_Languages}}</span></span>
Line 36: Line 38:
--></div></div>{{#if: {{PROTECTIONEXPIRY:edit|Template:TranslationMark/{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}{{{base|{{LanguageBar/basepage}}}}}}}
--></div></div>{{#if: {{PROTECTIONEXPIRY:edit|Template:TranslationMark/{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}{{{base|{{LanguageBar/basepage}}}}}}}
| {{#switch: {{TranslationMark/{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}{{{base|{{LanguageBar/basepage}}}}}|{{pagelang}}}}
| {{#switch: {{TranslationMark/{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}{{{base|{{LanguageBar/basepage}}}}}|{{pagelang}}}}
| U = {{Updatetranslation|This notice is put here by LanguageBar template and if you want to remove it after updating the translation you can do so on [[Template:TranslationMark/{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}{{{base|{{LanguageBar/basepage}}}}}|this]] page.}}
| U = {{Updatetranslation|LBCall=1}}


<div style="border-bottom:1px solid #65635F; display:block"></div>
<div style="border-bottom:1px solid #65635F; display:block"></div>
<br/>
<br/>
| T = {{Translate}}
| T = {{Translate|LBCall=1}}


<div style="border-bottom:1px solid #65635F; display:block"></div>
<div style="border-bottom:1px solid #65635F; display:block"></div>
<br/>
<br/>
| F = {{finishtranslation}}
| F = {{finishtranslation|LBCall=1}}
 
<div style="border-bottom:1px solid #65635F; display:block"></div>
<br/>
| M = {{machinetranslation|LBCall=1}}


<div style="border-bottom:1px solid #65635F; display:block"></div>
<div style="border-bottom:1px solid #65635F; display:block"></div>
<br/>
<br/>
}}
}}
}}<includeonly>[[Category:{{Language name|{{pagelang}}|en}}|{{{BASENAME}}}]]{{#ifeq: {{pagelang}} | en
}}[[Category:{{Language name|{{pagelang}}|en}}|{{LanguageBar/basepage}}]]{{#ifeq: {{pagelang}} | en
|
|
| {{#if:{{{notranscat|}}}
| {{#if:{{{notranscat|}}}
Line 55: Line 61:
| {{#switch: {{NAMESPACE}} ||Category|Valve Developer Community|Help={{ACategory|Translation}}}}
| {{#switch: {{NAMESPACE}} ||Category|Valve Developer Community|Help={{ACategory|Translation}}}}
}}
}}
}}</includeonly><!--
}}</onlyinclude>
 
--></onlyinclude>


</includeonly>
[[Category:Template LanguageBar/foreach use source]]
[[Category:Template LanguageBar/foreach use source]]

Latest revision as of 12:10, 3 June 2025

Warning icon.png
This template is used on many pages and changes may be widely noticed.
Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage.
Consider discussing changes on the talk page before implementing them.
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
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