Template:LocSwitch: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
Created page with "<includeonly>{{#switch: {{#titleparts:{{PAGENAME}}|1|2}} <!--Deutsch --> | de = {{{de}}} <!--Español --> | es = {{{es}}} <!--Português --> | pt-br= {{{pt-br|{{{pt|{{{br|}}}}}}}}} <!--Italiano --> | it = {{{it}}} <!--日本語 --> | ja = {{{ja}}} <!--Polski --> | pl = {{{pl}}} <!--Русский --> | ru = {{{ru}}} <!--中文(简体)-->| zh-hans = {{{zh-hans|{{{hans}}}}}} <!--中文(繁體)-->| zh-hant= {{{zh-hant|{{{hant}}}}}} | {{{en|{{{1}}}}}} }..." |
No edit summary |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly>{{#switch: {{#titleparts:{{PAGENAME}}|1|2}} | <includeonly>{{#switch: {{{lang|{{#titleparts:{{PAGENAME}}|1|2}}}}} | ||
<!--Deutsch --> | de = {{{de}}} | <!--Deutsch --> | de = {{{de}}} | ||
<!--Español --> | es = {{{es}}} | <!--Español --> | es = {{{es}}} | ||
| Line 11: | Line 11: | ||
| {{{en|{{{1}}}}}} | | {{{en|{{{1}}}}}} | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
; | '''Localization Switch''' is a template for simplified implementation of a switch, which automatically detects a language subpage and selects the appropriate line of text. It is recommended to use this template only for creating other templates. | ||
<nowiki>{{LocSwitch|de=|es=|pt-br=|it=|ja=|pl=|ru=|zh-hans=|zh-hant=}}</nowiki> | ===Use=== | ||
[[Category: | ; Horizontal layout | ||
<nowiki>{{LocSwitch|en=|de=|es=|pt-br=|it=|ja=|pl=|ru=|zh-hans=|zh-hant=}}</nowiki> | |||
; Vertical layout | |||
<nowiki> | |||
{{LocSwitch | |||
|en= | |||
|de= | |||
|es= | |||
|pt-br= | |||
|it= | |||
|ja= | |||
|pl= | |||
|ru= | |||
|zh-hans= | |||
|zh-hant= | |||
}}</nowiki> | |||
{{LanguageCodesNote}} | |||
[[Category:Utility templates]] | |||
Latest revision as of 21:08, 28 April 2026
Localization Switch is a template for simplified implementation of a switch, which automatically detects a language subpage and selects the appropriate line of text. It is recommended to use this template only for creating other templates.
Use
- Horizontal layout
{{LocSwitch|en=|de=|es=|pt-br=|it=|ja=|pl=|ru=|zh-hans=|zh-hant=}}
- Vertical layout
{{LocSwitch
|en=
|de=
|es=
|pt-br=
|it=
|ja=
|pl=
|ru=
|zh-hans=
|zh-hant=
}}
The language codes are:
- "en" — for pages in English (pages that are not language subpages)
- "de" — for /de subpages (German)
- "es" — for /es subpages (Spanish)
- "pt-br" — for /pt-br subpages (Portuguese)
- "fr" — for /fr subpages (French)
- "it" — for /it subpages (Italian)
- "ja" — for /ja subpages (Japanese)
- "pl" — for /pl subpages (Polish)
- "ru" — for /ru subpages (Russian)
- "zh-hans" — for /zh-hans subpages (Chinese, Simplified)
- "zh-hant" — for /zh-hant subpages (Chinese, Traditional)


