Template:LanguageNavBar: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
(rewording)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<table width="100%" style="border:1px solid #aaaaaa; border-spacing: 0px;">
<table width="100%" cellspacing="0" style="border:1px solid #aaaaaa; border-spacing: 0px;">
<tr valign="top" style="background: #EEF3E2;">
<tr style="background: #EEF3E2;">
<td style="width: 25px; padding-left: 0.5em;">[[Image:Geographylogo.png|25px|Languages]]</td>
<td style="width: 25px; padding: 0 1em 0 0.5em;">[[Image:Geographylogo.png|25px|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="width: 80px; border-right: 1px solid #aaaaaa; font-size: 85%;">'''Languages:'''</td>
'''[[{{{1|:{{NAMESPACE}}:{{BASEPAGENAME}}}}}|English]]'''
<td style="padding: 1px 1em 0 1em; background: #F6F9ED; font-size: 85%;">
[[{{{1|:{{NAMESPACE}}:{{BASEPAGENAME}}}}}|English]]
{{LanguageNavBar/Lang|de|{{{1|}}}}}
{{LanguageNavBar/Lang|de|{{{1|}}}}}
{{LanguageNavBar/Lang|es|{{{1|}}}}}
{{LanguageNavBar/Lang|es|{{{1|}}}}}
Line 10: 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><noinclude>
</td></tr></table><noinclude>


;Syntax:
;Syntax:
Line 20: Line 22:




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. Main Page/vi, 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.


Currently the template recognizes the languages below. New languages can be added as needed.  
Currently the template recognizes the following languages. New languages may be added as needed.  
:<tt>de</tt> - German
:<tt>de</tt> - German
:<tt>en</tt> - English (default)
:<tt>en</tt> - English (default)
Line 32: Line 34:
:<tt>nl</tt> - Dutch
:<tt>nl</tt> - Dutch
:<tt>pt</tt> - Portuguese
:<tt>pt</tt> - Portuguese
:<tt>sl</tt> - Slovene
:<tt>vi</tt> - Vietnamese
:<tt>vi</tt> - Vietnamese


[[Category:Templates|{{PAGENAME}}]]
[[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