Template:Userbox-lang/doc: Difference between revisions
(remove section heading) |
(→Parameters: add named parameter {{{skill}}}) |
||
| Line 3: | Line 3: | ||
=== Parameters === | === Parameters === | ||
The template has two unnamed parameters. | The template has two unnamed parameters and one named parameter. | ||
==== Unnamed parameters ==== | |||
# The first unnamed parameter is a two-letter code according to the {{wpd|ISO 639-1}} standard | # The first unnamed parameter is a two-letter code according to the {{wpd|ISO 639-1}} standard | ||
# The second (optional) unnamed parameter is a number to indicate the level of ability in this language. If this parameter is omitted the wording for native speaker will be displayed. | # The second (optional) unnamed parameter is a number to indicate the level of ability in this language. If this parameter is omitted the wording for native speaker will be displayed. | ||
| Line 12: | Line 13: | ||
#* 4 = near-native | #* 4 = near-native | ||
#* 5 = professional | #* 5 = professional | ||
==== Named parameters ==== | |||
;skill : This (optional) parameter can be used to define a skill other than speaking, for example reading or writing. If omitted the default is speaking. | |||
===Example of different language codes=== | ===Example of different language codes=== | ||
Revision as of 14:55, 28 December 2010
|
|
This is a documentation subpage for Template:Userbox-lang (see that page for the template itself). It contains usage information, categories and other content that is not part of the original template page. |
This template can be used to display the language and level of ability spoken by a contributor on their user page.
Parameters[edit source]
The template has two unnamed parameters and one named parameter.
Unnamed parameters[edit source]
- The first unnamed parameter is a two-letter code according to the ISO 639-1 standard
- The second (optional) unnamed parameter is a number to indicate the level of ability in this language. If this parameter is omitted the wording for native speaker will be displayed.
- 0 = limited or no ability
- 1 = basic
- 2 = intermediate
- 3 = advanced
- 4 = near-native
- 5 = professional
Named parameters[edit source]
- skill
- This (optional) parameter can be used to define a skill other than speaking, for example reading or writing. If omitted the default is speaking.
Example of different language codes[edit source]
NOTE: The template can be called using {{Userbox-lang}} or {{UBX-lang}}
| Situation | You type | You get | ||
|---|---|---|---|---|
| Native speaker of English |
{{UBX-lang|en}}
|
| ||
| Advanced speaker of Spanish |
{{UBX-lang|es|3}}
|
| ||
| Basic speaker of Japanese |
{{Userbox-lang|ja|1}}
|
|
Example of different ability levels[edit source]
Using English as an example the following shows the range of abilities that can be choosen.
| Ability | You type | You get | ||
|---|---|---|---|---|
| Native ability |
{{UBX-lang|en}}
|
| ||
| Professional ability |
{{UBX-lang|en|5}}
|
| ||
| Near-native ability |
{{Userbox-lang|en|4}}
|
| ||
| Advanced ability |
{{Userbox-lang|en|3}}
|
| ||
| Intermediate ability |
{{Userbox-lang|en|2}}
|
| ||
| Basic ability |
{{Userbox-lang|en|1}}
|
| ||
| Limited ability |
{{Userbox-lang|en|0}}
|
|