Difference between revisions of "Template:Multi-lang"
Alissa Sabre (talk | contribs) (Emptying so that Template:Languages can replace this.) |
Alissa Sabre (talk | contribs) (Replacing this template with another that have been provided under the name Template:Languages) |
||
Line 1: | Line 1: | ||
== Template == | |||
<onlyinclude><div class="LanguageLinks" style="margin: 1em 0;"> | |||
<table width="100%" style="clear: both; border: 1px solid #aaaaaa; border-collapse: collapse; padding: 0.2em; margin: 0; font-size: 85%; margin: 0 1px;"> | |||
<tr valign="top" style="background: #EEF3E2"> | |||
<td style="width: 10px; white-space: nowrap; padding: 4px 1em 0 0.5em; border-right: 1px solid #aaaaaa;">'''[[Project:Languages|Languages]]:''' </td><td style="padding: 1px 1em 0; background: #F6F9ED;"> | |||
{{#vardefine:langbase|{{#if:{{{1|}}}|{{{1|}}}|{{#switch:{{#sub:{{FULLPAGENAME}}|-3|1}}|/|\={{#sub:{{FULLPAGENAME}}|0|-3}}|{{FULLPAGENAME}}}}}}}} | |||
'''[[:{{#var:langbase}}|English]]''' | |||
{{Languages/Lang|de|{{#var:langbase}}|Deutsch}} | |||
{{Languages/Lang|es|{{#var:langbase}}|español}} | |||
{{Languages/Lang|fr|{{#var:langbase}}|français}} | |||
{{Languages/Lang|it|{{#var:langbase}}|Italiano}} | |||
{{Languages/Lang|ja|{{#var:langbase}}|日本語}} | |||
{{Languages/Lang|nl|{{#var:langbase}}|Nederlands}} | |||
{{Languages/Lang|pl|{{#var:langbase}}|Polski}} | |||
{{Languages/Lang|pt|{{#var:langbase}}|Português}} | |||
{{Languages/Lang|zh|{{#var:langbase}}|中文}} | |||
</td></tr></table></div></onlyinclude> | |||
== Syntax == | |||
<nowiki>{{{Multi-lang|PageName}}}</nowiki> | |||
* '''PageName''' (optional) - the name of the page to display language links for. If omitted then the English version of the current page is used. This parameter can normally be omitted, as it is only required if you want to link to a page other than the one you place the template on, which is very uncommon. If this parameter is used on a sub-page make sure you supply the root name, not the full page name (e.g. on [[MediaWiki/fr]] you would need to use <code><nowiki>{{{Multi-lang|MediaWiki}}}</nowiki></code> and not <code><nowiki>{{{Multi-lang|MediaWiki/fr}}}</nowiki></code>). | |||
== Usage == | |||
The template should be placed on pages that exist in more than one language, and it should be placed in the same location on each translation of the page. | |||
The English version of a page is always the main version, with all other languages as sub-pages, named using the appropriate language code (see below). | |||
For example, on the Main Page you would include the text <code><nowiki>{{{Multi-lang}}}</nowiki></code>, both on [[Main Page]] itself, and on each of its language sub-pages. The template automatically creates links to any language sub-pages that exist, e.g. <tt>Main Page/ja<tt>, <tt>Main Page/fr</tt>, and ignores non-existant languages. | |||
See [[Project:Languages]] for further details about translating pages. | |||
== Supported languages == | |||
The template includes a list of supported languages in it. Although it is easy to add a new language to the list, it is not recommended to add unnecessary languages. The language that has no pages in that language should be kept out of the list. | |||
== Origin == | |||
This template is originaly taken from [http://www.mediawiki.org/wiki/Template:Languages Template:Languages on the MediaWiki web site]. |
Revision as of 07:22, 4 November 2007
Template
Syntax
{{{Multi-lang|PageName}}}
- PageName (optional) - the name of the page to display language links for. If omitted then the English version of the current page is used. This parameter can normally be omitted, as it is only required if you want to link to a page other than the one you place the template on, which is very uncommon. If this parameter is used on a sub-page make sure you supply the root name, not the full page name (e.g. on MediaWiki/fr you would need to use
{{{Multi-lang|MediaWiki}}}
and not{{{Multi-lang|MediaWiki/fr}}}
).
Usage
The template should be placed on pages that exist in more than one language, and it should be placed in the same location on each translation of the page.
The English version of a page is always the main version, with all other languages as sub-pages, named using the appropriate language code (see below).
For example, on the Main Page you would include the text {{{Multi-lang}}}
, both on Main Page itself, and on each of its language sub-pages. The template automatically creates links to any language sub-pages that exist, e.g. Main Page/ja, Main Page/fr, and ignores non-existant languages.
See Project:Languages for further details about translating pages.
Supported languages
The template includes a list of supported languages in it. Although it is easy to add a new language to the list, it is not recommended to add unnecessary languages. The language that has no pages in that language should be kept out of the list.
Origin
This template is originaly taken from Template:Languages on the MediaWiki web site.