UserLanguage – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Add da & pl in description)
(Add sk and sl, add more examples, change level colours)
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}
<includeonly>{{#if:{{{1|}}}
| {{{!}} style="border-collapse: collapse; width: 20em; {{#switch:{{{2|5}}}
| {{{!}} style="border-collapse: collapse; width: 20em; {{#switch:{{{2|5}}}
| 1 = background-color: #C0C8FF; border: 0.125em solid #C0C8FF
| 1 = background-color: #EEE; border: 0.125em solid #EEE
| 2 = background-color: #77E0E8; border: 0.125em solid #77E0E8
| 2 = background-color: #CEF; border: 0.125em solid #CEF
| 3 = background-color: #99B3FF; border: 0.125em solid #99B3FF
| 3 = background-color: #FEA; border: 0.125em solid #FEA
| 4 = background-color: #CC0; border: 0.125em solid #CC0
| 4 = background-color: #CD5; border: 0.125em solid #CD5
| 6 = background-color: #F55; border: 0.125em solid #F55
 
|    background-color: #6EF7A7; border: 0.125em solid #6EF7A7
| 6 = background-color: gold; border: 0.125em solid gold
|    background-color: #ADA; border: 0.125em solid #ADA
}}"
}}"
{{!}} style="font-size: 1.5em; min-height: 2em; min-width: 3em; padding: 0.5em; text-align:center" {{!}} '''{{#switch:{{lc:{{{1|}}}}}
{{!}} style="font-size: 1.5em; min-height: 2em; min-width: 3em; padding: 0.5em; text-align:center" {{!}} '''{{#switch:{{lc:{{{1|}}}}}
Line 19: Line 20:
| ja = {{Wikipedia|Japanese language|ja-{{#sub:{{{2|5}}}|0|1}}}}
| ja = {{Wikipedia|Japanese language|ja-{{#sub:{{{2|5}}}|0|1}}}}
| pl = {{Wikipedia|Polish language|pl-{{#sub:{{{2|5}}}|0|1}}}}
| pl = {{Wikipedia|Polish language|pl-{{#sub:{{{2|5}}}|0|1}}}}
| sk = {{Wikipedia|Slovak language|pl-{{#sub:{{{2|5}}}|0|1}}}}
| sl = {{Wikipedia|Slovene language|pl-{{#sub:{{{2|5}}}|0|1}}}}
| tr = {{Wikipedia|Turkish language|tr-{{#sub:{{{2|5}}}|0|1}}}}
| tr = {{Wikipedia|Turkish language|tr-{{#sub:{{{2|5}}}|0|1}}}}
|      {{#sub:{{lc:{{{1}}}}}|0|2}}-{{#sub:{{{2|5}}}|0|1}}
|      {{#sub:{{lc:{{{1}}}}}|0|2}}-{{#sub:{{{2|5}}}|0|1}}
Line 40: Line 43:
| ja = Japanese
| ja = Japanese
| pl = Polish
| pl = Polish
| sk = Slovak
| sl = Slovene
| tr = Turkish
| tr = Turkish
|      {{uc:{{#sub:{{{1}}}|0|2}}}}
|      {{uc:{{#sub:{{{1}}}|0|2}}}}
Line 47: Line 52:
== Usage ==
== Usage ==
{{<nowiki/>UserLanguage|'''''language'''''|'''''level'''''}}
{{<nowiki/>UserLanguage|'''''language'''''|'''''level'''''}}
* language: {{Wikipedia|ISO 639-1}} language code (full list available {{Wikipedia|List of ISO 639-1 codes|here}}). Supported so far: <tt>cs</tt>, <tt>da</tt>, <tt>de</tt>, <tt>el</tt>, <tt>en</tt>, <tt>fi</tt>, <tt>fr</tt>, <tt>it</tt>, <tt>ja</tt>, <tt>pl</tt>, <tt>tr</tt>.
* language: {{Wikipedia|ISO 639-1}} language code (full list available {{Wikipedia|List of ISO 639-1 codes|here}}). Supported so far: <tt>cs</tt>, <tt>da</tt>, <tt>de</tt>, <tt>el</tt>, <tt>en</tt>, <tt>fi</tt>, <tt>fr</tt>, <tt>it</tt>, <tt>ja</tt>, <tt>pl</tt>, <tt>sk</tt>, <tt>sl</tt>, <tt>tr</tt>.


* level: (Optional, default 5) a number in range 1..6:
* level: (Optional, default 5) a number in range 1..6:
Line 57: Line 62:
*# professional level
*# professional level


{| class="wikitable"
{|
|+ Examples
|+ Examples
|- style="background-color: #EEE"
! Code
! Code
! Result
! Result
Line 70: Line 76:
| <nowiki>{{UserLanguage|en}}</nowiki>
| <nowiki>{{UserLanguage|en}}</nowiki>
| {{UserLanguage|en}}
| {{UserLanguage|en}}
|-
| colspan="2" style="text-align: center" | ''Below are all '''levels''' of language''
|-
| <nowiki>{{UserLanguage|en|1}}</nowiki>
| {{UserLanguage|en|1}}
|-
|-
| <nowiki>{{UserLanguage|en|2}}</nowiki>
| <nowiki>{{UserLanguage|en|2}}</nowiki>
| {{UserLanguage|en|2}}
| {{UserLanguage|en|2}}
|-
| <nowiki>{{UserLanguage|en|3}}</nowiki>
| {{UserLanguage|en|3}}
|-
| <nowiki>{{UserLanguage|en|4}}</nowiki>
| {{UserLanguage|en|4}}
|-
| <nowiki>{{UserLanguage|en|5}}</nowiki>
| {{UserLanguage|en|5}}
|-
| <nowiki>{{UserLanguage|en|6}}</nowiki>
| {{UserLanguage|en|6}}
|-
| colspan="2" style="text-align: center" | ''Below are all '''supported''' languages''
|-
| <nowiki>{{UserLanguage|cs}}</nowiki>
| {{UserLanguage|cs}}
|-
| <nowiki>{{UserLanguage|da}}</nowiki>
| {{UserLanguage|da}}
|-
| <nowiki>{{UserLanguage|de}}</nowiki>
| {{UserLanguage|de}}
|-
| <nowiki>{{UserLanguage|el}}</nowiki>
| {{UserLanguage|el}}
|-
| <nowiki>{{UserLanguage|en}}</nowiki>
| {{UserLanguage|en}}
|-
| <nowiki>{{UserLanguage|fi}}</nowiki>
| {{UserLanguage|fi}}
|-
| <nowiki>{{UserLanguage|fr}}</nowiki>
| {{UserLanguage|fr}}
|-
| <nowiki>{{UserLanguage|it}}</nowiki>
| {{UserLanguage|it}}
|-
| <nowiki>{{UserLanguage|ja}}</nowiki>
| {{UserLanguage|ja}}
|-
| <nowiki>{{UserLanguage|pl}}</nowiki>
| {{UserLanguage|pl}}
|-
| <nowiki>{{UserLanguage|sk}}</nowiki>
| {{UserLanguage|sk}}
|-
| <nowiki>{{UserLanguage|sl}}</nowiki>
| {{UserLanguage|sl}}
|-
| <nowiki>{{UserLanguage|tr}}</nowiki>
| {{UserLanguage|tr}}
|}
|}


[[Category:Templates|{{uc:{{PAGENAME}}}}]]
[[Category:Templates|{{uc:{{PAGENAME}}}}]]
</noinclude>
</noinclude>

Revision as of 03:37, 2 January 2021

Usage

{{UserLanguage|language|level}}

  • language: ISO 639-1 language code (full list available here). Supported so far: cs, da, de, el, en, fi, fr, it, ja, pl, sk, sl, tr.
  • level: (Optional, default 5) a number in range 1..6:
    1. basic level
    2. intermediate level
    3. advanced level
    4. near-native level
    5. native level
    6. professional level
Examples
Code Result
{{UserLanguage}} -no language specified-
{{UserLanguage||2}} -no language specified-
{{UserLanguage|en}}
en-5 This user is able to contribute with a native level of English.
Below are all levels of language
{{UserLanguage|en|1}}
en-1 This user is able to contribute with a basic level of English.
{{UserLanguage|en|2}}
en-2 This user is able to contribute with an intermediate level of English.
{{UserLanguage|en|3}}
en-3 This user is able to contribute with an advanced level of English.
{{UserLanguage|en|4}}
en-4 This user is able to contribute with a near-native level of English.
{{UserLanguage|en|5}}
en-5 This user is able to contribute with a native level of English.
{{UserLanguage|en|6}}
en-6 This user is able to contribute with a professional level of English.
Below are all supported languages
{{UserLanguage|cs}}
cs-5 This user is able to contribute with a native level of Czech.
{{UserLanguage|da}}
da-5 This user is able to contribute with a native level of Danish.
{{UserLanguage|de}}
de-5 This user is able to contribute with a native level of German.
{{UserLanguage|el}}
el-5 This user is able to contribute with a native level of Greek.
{{UserLanguage|en}}
en-5 This user is able to contribute with a native level of English.
{{UserLanguage|fi}}
fi-5 This user is able to contribute with a native level of Finnish.
{{UserLanguage|fr}}
fr-5 This user is able to contribute with a native level of French.
{{UserLanguage|it}}
it-5 This user is able to contribute with a native level of Italian.
{{UserLanguage|ja}}
ja-5 This user is able to contribute with a native level of Japanese.
{{UserLanguage|pl}}
pl-5 This user is able to contribute with a native level of Polish.
{{UserLanguage|sk}}
pl-5 This user is able to contribute with a native level of Slovak.
{{UserLanguage|sl}}
pl-5 This user is able to contribute with a native level of Slovene.
{{UserLanguage|tr}}
tr-5 This user is able to contribute with a native level of Turkish.