This template is protected from editing.

Difference between revisions of "Template:Lang name"

From Team Fortress Wiki
Jump to: navigation, search
m
Line 68: Line 68:
 
The first parameter should contain what type of output you want, and the second should contain the language code or name.
 
The first parameter should contain what type of output you want, and the second should contain the language code or name.
  
* {{tlx|Lang name|name|ru}} outputs {{Lang name|name|ru}}
+
* {{tlx|Lang name|name|ru}} outputs "{{Lang name|name|ru}}"
* {{tlx|Lang name|code|Russian}} outputs {{Lang name|code|Russian}}
+
* {{tlx|Lang name|code|Russian}} outputs "{{Lang name|code|Russian}}"
* {{tlx|Lang name|2=type=name|3=lang=fr}} outputs {{Lang name|name|fr}}
+
* {{tlx|Lang name|2=type=name|3=lang=fr}} outputs "{{Lang name|type=name|lang=fr}}"
* {{tlx|Lang name|2=type=code|3=lang=French}} outputs {{Lang name|code|fr}}
+
* {{tlx|Lang name|2=type=code|3=lang=French}} outputs "{{Lang name|type=code|lang=French}}"
  
 
=== Extra options ===
 
=== Extra options ===
Line 95: Line 95:
  
 
=== Native names ===
 
=== Native names ===
The MediaWiki software can already display the native name of a language by using the code {{code|1={{#language:de}}}} (which generates {{#language:de}}). However, {{tl|Lang name}} can also perform the same function using the syntax {{tlx|Lang name|native|de}}.
+
The MediaWiki software can already display the native name of a language by using the code {{code|1={{#language:de}}}} (which generates "{{#language:de}}"). However, {{tl|Lang name}} can also perform the same function using the syntax {{tlx|Lang name|native|de}}.
  
 
[[Category:Language templates|Lang name]]
 
[[Category:Language templates|Lang name]]
 
</noinclude>
 
</noinclude>

Revision as of 05:52, 10 September 2010

Documentation for Lang name

{{Lang name}} can output the ISO code for a language if given the English name, and can output the English name if given the ISO code.

Usage

The first parameter should contain what type of output you want, and the second should contain the language code or name.

Extra options

Any of the following options can be used to specify Chinese and Portuguese languages. Using any of the names from the list will output the language code in brackets if type=code or code in parameter 1 is specified.

  • "zh-hans"
    • S.Chinese
    • Chinese Simp
    • Chinese Simplified
    • Chinese (Simplified)
    • Simplified Chinese
    • Simp Chinese
    • Simp. Chinese
  • "zh-hant"
    • T.Chinese
    • Traditional Chinese
    • Chinese Traditional
    • Chinese (Traditional)
  • "pt-br"
    • Portuguese Brazil
    • Brazilian Portuguese
    • Portuguese (Brazil)

Native names

The MediaWiki software can already display the native name of a language by using the code Deutsch (which generates "Deutsch"). However, {{Lang name}} can also perform the same function using the syntax {{Lang name|native|de}}.