Template: LanguageNative

From LibrePlanet
Jump to: navigation, search
m (fixing...)
(revision: 2.0)
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'''
  
Rev. 1.1 - Date: 25/01/2011
+
This template returns the native language of a given (2-digit lowercase) language code (ISO 639-1).  
  
'''Description''':
+
'''''Note''''' - Altought it has been developed to be called as a sub-template from [[Template:Languages]], this template might be used everywhere.
  
This sub-template is designed to simplify [[Template:Languages]], by allowing a way to automatically display the native language name.
+
'''Usage'''
 
 
''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|Code}}
+
{{LanguageNative|<LangCode>}}
 
</pre>
 
</pre>
where 'Code' is the locale (ISO 639-1) of the native language name to display.
+
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>.
 
</noinclude><onlyinclude>{{#switch:{{{1}}}
 
</noinclude><onlyinclude>{{#switch:{{{1}}}
 
|aa=Afaraf
 
|aa=Afaraf

Revision as of 16:20, 25 January 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).

Note - Altought it has been developed to be called as a sub-template from Template:Languages, this template might be used everywhere.

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>. {{{1}}}