Template: LanguageNative

From LibrePlanet
Jump to: navigation, search
(Template 'LanguageNative' - rev.1.1, 25/01/2011)
 
m (Added a warning about editing this template)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
 +
This is the &quot;LanguageNative&quot; template. Edit the page to see the template text.
 +
<!--
 +
Coded by: alexus <http://libreplanet.org/wiki/User:Alexus>
 +
Revision: 2.0
 +
Date:    25/01/2011
 +
-->
  
This is the &quot;LanguageNative&quot; sub-template. Edit the page to see the template text.
+
'''Description'''
  
 +
This template returns the native language of a given (2-digit lowercase) language code (ISO 639-1).
  
 +
'''''Important note''''' - Altought it has been developed to be called as a sub-template from [[Template:Languages]], this template might be used everywhere. Please, '''do not edit''' if you are not REALLY sure about what you are doing.
  
Rev. 1.1 - Date: 25/01/2011
+
'''Usage'''
 
 
 
 
 
 
'''Description''':
 
 
 
 
 
 
 
This sub-template is designed to simplify [[Template:Languages]], by allowing a way to automatically display the native language name.
 
 
 
 
 
 
 
''IMPORTANT NOTE'' - This template should not be used anywhere except in the [[Template:Languages]] template. This sub-template doesn't display properly when not included. Please see [[Template:Languages]] for the complete version.
 
 
 
 
 
 
 
'''Usage''':
 
 
 
 
 
  
 
It should be called in the following format:
 
It should be called in the following format:
 
 
<pre>
 
<pre>
 
+
{{LanguageNative|<LangCode>}}
{{LanguageNative|Code}}
 
 
 
 
</pre>
 
</pre>
 +
where:
 +
* <LangCode> is the (2-digit lowercase) language code (ISO 639-1) corresponding to the desired native language.
  
where 'Code' is the locale (ISO 639-1) of the native language name to display.
+
If no <LangCode> matches, it returns by default the same given <LangCode>.
 
+
</noinclude><onlyinclude>{{#if:{{{1|}}}|{{#switch:{{{1}}}
</noinclude>
 
<onlyinclude><span lang="{{{1}}}" xml:lang="{{{1}}}">{{#switch:{{{1}}}
 
 
 
 
 
 
|aa=Afaraf
 
|aa=Afaraf
 
|ab=аҧсуа
 
|ab=аҧсуа
Line 78: Line 63:
 
|en=English
 
|en=English
 
|eo=Esperanto
 
|eo=Esperanto
|es=castellano
+
|es=español
 
|et=eesti
 
|et=eesti
 
|eu=euskara
 
|eu=euskara
Line 224: Line 209:
 
|zu=isiZulu
 
|zu=isiZulu
 
|#default={{{1}}}
 
|#default={{{1}}}
 
+
}}|}}</onlyinclude>
}}</span></onlyinclude>
 

Latest revision as of 15:04, 8 September 2011

This is the "LanguageNative" template. Edit the page to see the template text.

Description

This template returns the native language of a given (2-digit lowercase) language code (ISO 639-1).

Important note - Altought it has been developed to be called as a sub-template from Template:Languages, this template might be used everywhere. Please, do not edit if you are not REALLY sure about what you are doing.

Usage

It should be called in the following format:

{{LanguageNative|<LangCode>}}

where:

  • <LangCode> is the (2-digit lowercase) language code (ISO 639-1) corresponding to the desired native language.

If no <LangCode> matches, it returns by default the same given <LangCode>.