Template:Languages/Lang

From Alexandre Navarro's Wiki

(Difference between revisions)
Jump to: navigation, search
Current revision (20:51, 1 April 2008) (edit) (undo)
 
(2 intermediate revisions not shown.)
Line 1: Line 1:
-
<includeonly>{{#ifexist: {{#if: {{{2|}}} | {{{2}}} | {{#if: {{NAMESPACE}} | {{NAMESPACE}}:}}{{BASEPAGENAME}}}}/{{{1}}} | &nbsp;&bull;&nbsp;<span lang="{{{1}}}">{{#if: {{{2|}}}|[[{{{2}}}/{{{1}}}|{{#language:{{{1}}}}}]]| [[:{{NAMESPACE}}:{{BASEPAGENAME}}/{{{1}}}|{{#language:{{{1}}}}}]]}}</span>|<span></span>}}</includeonly><noinclude>
+
<includeonly><span lang="{{{1}}}">[[:{{NAMESPACE}}:{{BASEPAGENAME}}/{{{1}}}|{{#language:{{{1}}}}}]]</span><span>&nbsp;</span>
 +
 
 +
 
 +
 
 +
</includeonly><noinclude>
== Template ==
== Template ==
''This sub-template doesn't display properly when not included. Please see [[Template:Languages]] for the complete version.''
''This sub-template doesn't display properly when not included. Please see [[Template:Languages]] for the complete version.''
Line 12: Line 16:
This template should not be used anywhere except in the Languages template.
This template should not be used anywhere except in the Languages template.
[[Category:Language templates]]
[[Category:Language templates]]
 +
 +
 +
{{#ifexist: {{#if: {{{2|}}} | {{{2}}} | {{#if: {{NAMESPACE}} | {{NAMESPACE}}:}}{{BASEPAGENAME}}}}/{{{1}}} | &nbsp;&bull;&nbsp;<span lang="{{{1}}}">{{#if: {{{2|}}}|[[{{{2}}}/{{{1}}}|{{#language:{{{1}}}}}]]| [[:{{NAMESPACE}}:{{BASEPAGENAME}}/{{{1}}}|{{#language:{{{1}}}}}]]}}</span>|<span></span>}}
 +
 +
</noinclude>
</noinclude>

Current revision

Template

This sub-template doesn't display properly when not included. Please see Template:Languages for the complete version.

Usage

This template is designed to simplify Template:Languages, by allowing a simpler syntax for adding new languages. Each language is included by calling this template with the following parameters:

  • Language code (e.g. fr)
  • (optional) Page name - if not supplied the page is automatically worked out based on where the language template is included.

This template should not be used anywhere except in the Languages template.


{{#ifexist: {{#if: | {{{2}}} | {{#if: Template | Template:}}Languages/Lang}}/{{{1}}} |  • {{#if: |[[{{{2}}}/{{{1}}}|{{{1}}}]]| [[:Template:Languages/Lang/{{{1}}}|{{{1}}}]]}}|}}


Personal tools