Difference between revisions of "Template:LanguageLink"

From Pandora Wiki
Jump to: navigation, search
(Created page with "<includeonly>en{{#ifexist: En:{{{1}}} |e|{{#ifexist: {{{1}}} |e|m}}}}</includeonly><noinclude> == Purpose == In order to avoid <nowiki>{{#switch |en = }}</nowiki> in [[Template:...")
 
(fix)
 
Line 1: Line 1:
<includeonly>en{{#ifexist: En:{{{1}}} |e|{{#ifexist: {{{1}}} |e|m}}}}</includeonly><noinclude>
+
<includeonly>• <span lang="{{{1}}}">[[{{{1}}}:{{{2}}}|{{{3|{{#language:{{{1}}} }}}}}]]</span></includeonly><noinclude>
== Purpose ==
+
Basically, this is used in [[Template:Languages]] and [[Template:LanguageLinks]].
 +
== Input parameters ==
 +
* '''1st''': language code (ex. de en zh-hans)
 +
* '''2nd''': the base page name (ex. JOSM)
 +
* ''3rd'': (optional) Display name (use it, if mediawiki cannot generate the language name by <nowiki>{{#language:xx}}</nowiki>.)
 +
== example  ==
 +
<nowiki>{{LanguageLink|de|JOSM}} {{LanguageLink|ja|JOSM}} {{LanguageLink|ja|JOSM|Nihongo}}</nowiki>
  
In order to avoid <nowiki>{{#switch |en = }}</nowiki> in [[Template:LanguageExisting]], the ''en'' case was separated to this template.
+
{{LanguageLink|de|JOSM}} {{LanguageLink|ja|JOSM}} {{LanguageLink|ja|JOSM|Nihongo}}
  
[[Category:Template:Internationalisation|LanguageExistingEn]]
+
[[Category:Template:Internationalisation|LanguageLink]]
 
</noinclude>
 
</noinclude>

Latest revision as of 13:43, 20 April 2011

Basically, this is used in Template:Languages and Template:LanguageLinks.

Input parameters

  • 1st: language code (ex. de en zh-hans)
  • 2nd: the base page name (ex. JOSM)
  • 3rd: (optional) Display name (use it, if mediawiki cannot generate the language name by {{#language:xx}}.)

example

{{LanguageLink|de|JOSM}} {{LanguageLink|ja|JOSM}} {{LanguageLink|ja|JOSM|Nihongo}}

Deutsch日本語Nihongo