Template:Language/archives/MultiPage/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(descriptions for parameters)
Line 4: Line 4:
{{ModernNote|This template is still in development. Some pages have already been moved, but at the moment it's better to stop there.}}
{{ModernNote|This template is still in development. Some pages have already been moved, but at the moment it's better to stop there.}}


== Parameters and Examples ==
{| class="standard-table" style="width:100%"
!style="width:10%"|Parameter
!Description
!Example
|-
|align="center"|No Parameters
|The template will look for translation subpages and load one of them according to the interface language. The template will load the English version and display a message if the translation subpage does not exist. The template will only display a message if there are not any translations and the English version does not exist.
|{{CodeBlock|{{((}}{{ROOTPAGENAME}}{{))}}}}
|-
|align="center"|{{Code|style=1|{{param|page}}}}
|''Optional:'' The page that the template create multi-language links according to.
{{ModernNote|Capitalization matters, even on the first letter of the page name! Underscores must be replaced with spaces. {{Code|select=1|ai_changehintgroup}} must be written as {{Code|select=1|Ai changehintgroup}}. However, this parameter can be omitted if the page name is without a suffix.}}
|{{CodeBlock|<nowiki>{{MultiPage|page=Main Page}}</nowiki>}}
|-
|align="center"|{{Code|style=1|{{param|basepage}}}}
|''Optional:'' If the translations are in subpages that are level 2 or above, this can specify what the root page name is.
{{ModernNote|Capitalization matters, even on the first letter of the page name! Underscores must be replaced with spaces. {{Code|select=1|ai_changehintgroup}} must be written as {{Code|select=1|Ai changehintgroup}}. However, this parameter can be omitted if the page name is without a suffix.}}
|{{CodeBlock|<nowiki>{{MultiPage|page=Template:Doc/doc|basepage=Template:Doc}}</nowiki>}}
|-
|align="center"|{{Code|style=1|{{param|title}}}}
|''Optional:'' This parameter can be used to change the text of the page titlebar (logically, into the text that should be displayed for the language of the page).
{{ModernWarning|On some pages you may receive this error: '''Warning''': Display title "env_cubemap" overrides earlier display title <nowiki>"<code>Env cubemap</code>"</nowiki>. This can be due to the fact that the page uses a different template in which the page title is set.}}
{{ModernNote|If you want to change the title, use the parameter {{Code|style=1|{{param|title}}}} of {{tl|Language subpage}} in language subpages so that the title will change automatically. Otherwise, you can
{{CodeBlock|{{((}}MultiPage{{!}}<nowiki>{{{1|}}}</nowiki>{{!}}title{{=}}My sweet page{{))}}}} for non-translatable title.}}
| {{CodeBlock|<nowiki>{{MultiPage|title=Main Page}}</nowiki>}}
|-
|align="center"|{{Code|style=1|{{param|margin-right}}}}
|''Optional:'' The right margin of the buttons that are to the right top.
| {{CodeBlock|<nowiki>{{MultiPage|title=Main Page|margin-right=26px}}</nowiki>}}
|}
== Examples ==
== Examples ==
{{CodeBlock|&#60;onlyinclude>{{((}}MultiPage<nowiki>|{{{1|}}}</nowiki>{{))}}&#60;/onlyinclude>}}
{{CodeBlock|&#60;onlyinclude>{{((}}MultiPage<nowiki>|{{{1|}}}</nowiki>{{))}}&#60;/onlyinclude>}}
Line 11: Line 42:


== Other ==
== Other ==
{| class="standard-table sortable"
{| class="standard-table sortable" style="width:100%"
|+ Currently Supported Languages
|+ Currently Supported Languages
! Language
! Language

Revision as of 04:52, 24 February 2023

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

Replacement for {{lang}}.

Template:ModernNote

Parameters and Examples

Parameter Description Example
No Parameters The template will look for translation subpages and load one of them according to the interface language. The template will load the English version and display a message if the translation subpage does not exist. The template will only display a message if there are not any translations and the English version does not exist.
{{Language}}
{{{page}}} Optional: The page that the template create multi-language links according to.

Template:ModernNote

{{MultiPage|page=Main Page}}
{{{basepage}}} Optional: If the translations are in subpages that are level 2 or above, this can specify what the root page name is.

Template:ModernNote

{{MultiPage|page=Template:Doc/doc|basepage=Template:Doc}}
{{{title}}} Optional: This parameter can be used to change the text of the page titlebar (logically, into the text that should be displayed for the language of the page).

Template:ModernWarning Template:ModernNote

{{MultiPage|title=Main Page}}
{{{margin-right}}} Optional: The right margin of the buttons that are to the right top.
{{MultiPage|title=Main Page|margin-right=26px}}

Examples

<onlyinclude>{{MultiPage|{{{1|}}}}}</onlyinclude>

Template:ModernNote

Other

Currently Supported Languages
Language Page name Icon Icon Template
English Page_name/en English {{en}}
Catalan Page_name/ca Català {{ca}}
Czech Page_name/cs Čeština {{cz}}
German Page_name/de Deutsch {{de}}
Spanish Page_name/es Español {{es}}
Estonian Page_name/et Eestlane {{et}}
French Page_name/fr Français {{fr}}
Hungarian Page_name/hu Magyar {{hu}}
Greek Page_name/el Ελληνικά {{el}}
Italian Page_name/it Italiano {{it}}
Dutch Page_name/nl Nederlands {{nl}}
Norwegian Page_name/no Norsk {{norway}}
Polish Page_name/pl Polski {{pl}}
Portuguese Page_name/pt Português {{pt}}
Portuguese (Brazilian) Page_name/pt-br Português-Brasileiro {{pt-br}}
Russian Page_name/ru Русский {{ru}}
Ukrainian Page_name/uk Українська {{uk}}
Swedish Page_name/sv Svenska {{sv}}
Turkish Page_name/tr
{{tr}}
Japanese Page_name/ja 日本語 {{ja}}
Chinese (PRC) Page_name/zh 简体中文 {{zh}}
Chinese (Taiwan) Page_name/zh-tw 正體中文 {{zh-tw}}
Korean Page_name/ko 한국어 {{ko}}
Georgian Page_name/ka ქართული ენა {{ka}}
Hebrew Page_name/he עִברִית {{he}}