UserLanguage – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(Add Czech, Fix Greek/Hellenic)
(Add ar, es, pa, pt, ru, sv, th, zh, Fix doc)
 
(8 intermediate revisions by the same user not shown)
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|}}}}}
{{!}} class="plainlinks" style="font-size: 1.5em; min-height: 2em; min-width: 3em; padding: 0.5em; text-align:center" {{!}} '''{{#switch:{{lc:{{{1|}}}}}
| cs = {{Wikipedia|Czech language|cs-{{#sub:{{{2|5}}}|0|1}}}}
| ar = {{Link|https://en.wikipedia.org/wiki/Arabic|ar-{{#sub:{{{2|5}}}|0|1}}}}
| de = {{Wikipedia|German language|de-{{#sub:{{{2|5}}}|0|1}}}}
| cs = {{Link|https://en.wikipedia.org/wiki/Czech_language|cs-{{#sub:{{{2|5}}}|0|1}}}}
| el = {{Wikipedia|Greek language|el-{{#sub:{{{2|5}}}|0|1}}}}
| da = {{Link|https://en.wikipedia.org/wiki/Danish_language|da-{{#sub:{{{2|5}}}|0|1}}}}
| en = {{Wikipedia|English language|en-{{#sub:{{{2|5}}}|0|1}}}}
| de = {{Link|https://en.wikipedia.org/wiki/German_language|de-{{#sub:{{{2|5}}}|0|1}}}}
| fi = {{Wikipedia|Finnish language|fi-{{#sub:{{{2|5}}}|0|1}}}}
| el = {{Link|https://en.wikipedia.org/wiki/Greek_language|el-{{#sub:{{{2|5}}}|0|1}}}}
| fr = {{Wikipedia|French language|fr-{{#sub:{{{2|5}}}|0|1}}}}
| en = {{Link|https://en.wikipedia.org/wiki/English_language|en-{{#sub:{{{2|5}}}|0|1}}}}
| it = {{Wikipedia|Italian language|it-{{#sub:{{{2|5}}}|0|1}}}}
| es = {{Link|https://en.wikipedia.org/wiki/Spanish_language|es-{{#sub:{{{2|5}}}|0|1}}}}
| ja = {{Wikipedia|Japanese language|ja-{{#sub:{{{2|5}}}|0|1}}}}
| fi = {{Link|https://en.wikipedia.org/wiki/Finnish_language|fi-{{#sub:{{{2|5}}}|0|1}}}}
| tr = {{Wikipedia|Turkish language|tr-{{#sub:{{{2|5}}}|0|1}}}}
| fr = {{Link|https://en.wikipedia.org/wiki/French_language|fr-{{#sub:{{{2|5}}}|0|1}}}}
| it = {{Link|https://en.wikipedia.org/wiki/Italian_language|it-{{#sub:{{{2|5}}}|0|1}}}}
| ja = {{Link|https://en.wikipedia.org/wiki/Japanese_language|ja-{{#sub:{{{2|5}}}|0|1}}}}
| nl = {{Link|https://en.wikipedia.org/wiki/Dutch_language|nl-{{#sub:{{{2|5}}}|0|1}}}}
| pa = {{Link|https://en.wikipedia.org/wiki/Punjabi_language|pa-{{#sub:{{{2|5}}}|0|1}}}}
| pl = {{Link|https://en.wikipedia.org/wiki/Polish_language|pl-{{#sub:{{{2|5}}}|0|1}}}}
| pt = {{Link|https://en.wikipedia.org/wiki/Portuguese_language|pt-{{#sub:{{{2|5}}}|0|1}}}}
| ru= {{Link|https://en.wikipedia.org/wiki/Russian_language|ru-{{#sub:{{{2|5}}}|0|1}}}}
| sk = {{Link|https://en.wikipedia.org/wiki/Slovak_language|sk-{{#sub:{{{2|5}}}|0|1}}}}
| sl = {{Link|https://en.wikipedia.org/wiki/Slovene_language|sl-{{#sub:{{{2|5}}}|0|1}}}}
| sv = {{Link|https://en.wikipedia.org/wiki/Swedish_language|sv-{{#sub:{{{2|5}}}|0|1}}}}
| th = {{Link|https://en.wikipedia.org/wiki/Thai_language|th-{{#sub:{{{2|5}}}|0|1}}}}
| tr = {{Link|https://en.wikipedia.org/wiki/Turkish_language|tr-{{#sub:{{{2|5}}}|0|1}}}}
| zh = {{Link|https://en.wikipedia.org/wiki/Chinese_language|zh-{{#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 28: Line 42:
|    a '''native'''
|    a '''native'''
}} level of '''{{#switch:{{lc:{{{1}}}}}
}} level of '''{{#switch:{{lc:{{{1}}}}}
| ar = Arabic
| cs = Czech
| cs = Czech
| da = Danish
| de = German
| de = German
| el = Greek
| el = Greek
| en = English
| en = English
| es = Spanish
| fi = Finnish
| fi = Finnish
| fr = French
| fr = French
| it = Italian
| it = Italian
| ja = Japanese
| ja = Japanese
| nl = Dutch
| pa = Punjabi
| pl = Polish
| pt = Portuguese
| ru = Russian
| sk = Slovak
| sl = Slovene
| sv = Swedish
| th = Thai
| tr = Turkish
| tr = Turkish
| zh = Chinese
|      {{uc:{{#sub:{{{1}}}|0|2}}}}
|      {{uc:{{#sub:{{{1}}}|0|2}}}}
}}'''.
}}'''.
Line 43: Line 70:
== 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>de</tt>, <tt>el</tt>, <tt>en</tt>, <tt>fi</tt>, <tt>fr</tt>, <tt>it</tt>, <tt>ja</tt>, <tt>tr</tt>.
* language: {{Link|https://en.wikipedia.org/wiki/ISO_639-1}} language code (full list available {{Link|https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes|here}}). Supported so far: {{hl|ar}}, {{hl|cs}}, {{hl|da}}, {{hl|de}}, {{hl|el}}, {{hl|en}}, {{hl|es}}, {{hl|fi}}, {{hl|fr}}, {{hl|it}}, {{hl|ja}}, {{hl|nl}}, {{hl|pa}}, {{hl|pl}}, {{hl|pt}}, {{hl|ru}}, {{hl|sk}}, {{hl|sl}}, {{hl|sv}}, {{hl|th}}, {{hl|tr}}, {{hl|zh}}.


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


{| class="wikitable"
{|
|+ Examples
|+ Examples
|- style="background-color: #EEE"
! Code
! Code
! Result
! Result
Line 66: Line 94:
| <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|ar}}</nowiki>
| {{UserLanguage|ar}}
|-
| <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|es}}</nowiki>
| {{UserLanguage|es}}
|-
| <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|nl}}</nowiki>
| {{UserLanguage|nl}}
|-
| <nowiki>{{UserLanguage|pa}}</nowiki>
| {{UserLanguage|pa}}
|-
| <nowiki>{{UserLanguage|pl}}</nowiki>
| {{UserLanguage|pl}}
|-
| <nowiki>{{UserLanguage|pt}}</nowiki>
| {{UserLanguage|pt}}
|-
| <nowiki>{{UserLanguage|ru}}</nowiki>
| {{UserLanguage|ru}}
|-
| <nowiki>{{UserLanguage|sk}}</nowiki>
| {{UserLanguage|sk}}
|-
| <nowiki>{{UserLanguage|sl}}</nowiki>
| {{UserLanguage|sl}}
|-
| <nowiki>{{UserLanguage|sv}}</nowiki>
| {{UserLanguage|sv}}
|-
| <nowiki>{{UserLanguage|th}}</nowiki>
| {{UserLanguage|th}}
|-
| <nowiki>{{UserLanguage|tr}}</nowiki>
| {{UserLanguage|tr}}
|-
| <nowiki>{{UserLanguage|zh}}</nowiki>
| {{UserLanguage|zh}}
|}
|}


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

Latest revision as of 23:29, 26 February 2024

Usage

{{UserLanguage|language|level}}

  • language: ISO 639-1 language code (full list available here). Supported so far: ar, cs, da, de, el, en, es, fi, fr, it, ja, nl, pa, pl, pt, ru, sk, sl, sv, th, tr, zh.
  • 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}}
This user is able to contribute with a native level of English.
Below are all levels of language
{{UserLanguage|en|1}}
This user is able to contribute with a basic level of English.
{{UserLanguage|en|2}}
This user is able to contribute with an intermediate level of English.
{{UserLanguage|en|3}}
This user is able to contribute with an advanced level of English.
{{UserLanguage|en|4}}
This user is able to contribute with a near-native level of English.
{{UserLanguage|en|5}}
This user is able to contribute with a native level of English.
{{UserLanguage|en|6}}
This user is able to contribute with a professional level of English.
Below are all supported languages
{{UserLanguage|ar}}
This user is able to contribute with a native level of Arabic.
{{UserLanguage|cs}}
This user is able to contribute with a native level of Czech.
{{UserLanguage|da}}
This user is able to contribute with a native level of Danish.
{{UserLanguage|de}}
This user is able to contribute with a native level of German.
{{UserLanguage|el}}
This user is able to contribute with a native level of Greek.
{{UserLanguage|en}}
This user is able to contribute with a native level of English.
{{UserLanguage|es}}
This user is able to contribute with a native level of Spanish.
{{UserLanguage|fi}}
This user is able to contribute with a native level of Finnish.
{{UserLanguage|fr}}
This user is able to contribute with a native level of French.
{{UserLanguage|it}}
This user is able to contribute with a native level of Italian.
{{UserLanguage|ja}}
This user is able to contribute with a native level of Japanese.
{{UserLanguage|nl}}
This user is able to contribute with a native level of Dutch.
{{UserLanguage|pa}}
This user is able to contribute with a native level of Punjabi.
{{UserLanguage|pl}}
This user is able to contribute with a native level of Polish.
{{UserLanguage|pt}}
This user is able to contribute with a native level of Portuguese.
{{UserLanguage|ru}}
This user is able to contribute with a native level of Russian.
{{UserLanguage|sk}}
This user is able to contribute with a native level of Slovak.
{{UserLanguage|sl}}
This user is able to contribute with a native level of Slovene.
{{UserLanguage|sv}}
This user is able to contribute with a native level of Swedish.
{{UserLanguage|th}}
This user is able to contribute with a native level of Thai.
{{UserLanguage|tr}}
This user is able to contribute with a native level of Turkish.
{{UserLanguage|zh}}
This user is able to contribute with a native level of Chinese.