Template:LanguageNavBar: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(table formatting)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<table width="100%" cellspacing="0" style="border:1px solid #aaaaaa; border-spacing: 0px;">
<table width="100%" style="border:1px solid #aaaaaa; border-spacing: 0px;">
<tr style="background: #EEF3E2;">
<tr valign="top" style="background: #EEF3E2;">
<td style="width: 25px; padding: 0 1em 0 0.5em;">[[Image:Geographylogo.png|25px|Languages]]</td>
<td style="width: 25px; padding-left: 0.5em;">[[Image:Geographylogo.png|25px|Languages]]</td>
<td style="width: 80px; border-right: 1px solid #aaaaaa; font-size: 85%;">'''Languages:'''</td>
<td style="width: 10px; white-space: nowrap; padding: 4px 1em 0 0.5em; border-right: 1px solid #aaaaaa;"><small>'''Languages:'''&nbsp;</small></td><td style="padding: 1px 1em 0; background: #F6F9ED;"><small>
<td style="padding: 1px 1em 0 1em; background: #F6F9ED; font-size: 85%;">
'''[[{{{1|:{{NAMESPACE}}:{{BASEPAGENAME}}}}}|English]]'''
[[{{{1|:{{NAMESPACE}}:{{BASEPAGENAME}}}}}|English]]
{{LanguageNavBar/Lang|de|{{{1|}}}}}
{{LanguageNavBar/Lang|de|{{{1|}}}}}
{{LanguageNavBar/Lang|es|{{{1|}}}}}
{{LanguageNavBar/Lang|es|{{{1|}}}}}
Line 11: Line 11:
{{LanguageNavBar/Lang|nl|{{{1|}}}}}
{{LanguageNavBar/Lang|nl|{{{1|}}}}}
{{LanguageNavBar/Lang|pt|{{{1|}}}}}
{{LanguageNavBar/Lang|pt|{{{1|}}}}}
{{LanguageNavBar/Lang|sl|{{{1|}}}}}
{{LanguageNavBar/Lang|vi|{{{1|}}}}}
{{LanguageNavBar/Lang|vi|{{{1|}}}}}
</small></td></tr></table></includeonly><noinclude>
</td></tr></table><noinclude>


;Syntax:
;Syntax:
  <nowiki>{{LanguageNavBar}}</nowiki>
  <nowiki>{{LanguageNavBar}}</nowiki>
  <nowiki>{{LanguageNavBar|PageName}}</nowiki>
  <nowiki>{{LanguageNavBar|<page_name>}}</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 [[Main Page/vi]] you would need to use <code><nowiki>{{LanguageNavBar|Main Page}}</nowiki></code> and not <code><nowiki>{{LanguageNavBar|Main Page/vi}}</nowiki></code>).
;<page_name>:  Optional - the name of the page to display language links for.  If omitted then the English version of the current page is used.  If this parameter is used on a sub-page make sure you supply the root name, not the full page name (e.g. on [[Main Page/vi]] you would need to use <code><nowiki>{{LanguageNavBar|Main Page}}</nowiki></code> and not <code><nowiki>{{LanguageNavBar|Main Page/vi}}</nowiki></code>).


;Usage:
The template should only 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.  
The template should only 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 is always the main version, with all other languages as sub-pages, named using the appropriate language code.  


For example, on the Main Page you would include the text <code><nowiki>{{LanguageNavBar}}</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.
For example, on the Main Page you would include the text <code><nowiki>{{LanguageNavBar}}</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. Main Page/vi, and ignores non-existant languages.


[[Category:Templates|{{PAGENAME}}]]
Currently the template recognizes the following languages. New languages may be added as needed.
:<tt>de</tt> - German
:<tt>en</tt> - English (default)
:<tt>es</tt> - Spanish
:<tt>fr</tt> - French
:<tt>it</tt> - Italian
:<tt>nl</tt> - Dutch
:<tt>pt</tt> - Portuguese
:<tt>sl</tt> - Slovene
:<tt>vi</tt> - Vietnamese
 
[[Category:Navigational templates]]

Latest revision as of 00:21, 25 May 2014

Languages Languages:

English

Syntax
{{LanguageNavBar}}
{{LanguageNavBar|<page_name>}}
<page_name>
Optional - the name of the page to display language links for. If omitted then the English version of the current page is used. If this parameter is used on a sub-page make sure you supply the root name, not the full page name (e.g. on Main Page/vi you would need to use {{LanguageNavBar|Main Page}} and not {{LanguageNavBar|Main Page/vi}}).


The template should only 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 is always the main version, with all other languages as sub-pages, named using the appropriate language code.

For example, on the Main Page you would include the text {{LanguageNavBar}}, 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/vi, and ignores non-existant languages.

Currently the template recognizes the following languages. New languages may be added as needed.

de - German
en - English (default)
es - Spanish
fr - French
it - Italian
nl - Dutch
pt - Portuguese
sl - Slovene
vi - Vietnamese