UserLanguage – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(Template creation)
 
(Add Czech, Fix Greek/Hellenic)
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: #C0C8FF; border: 0.125em solid #C0C8FF
| 2 = background-color: #77E0E8; border: 0.125em solid #77E0E8
| 2 = background-color: #77E0E8; border: 0.125em solid #77E0E8
Line 9: Line 9:
}}"
}}"
{{!}} 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|}}}}}
| cs = {{Wikipedia|Czech language|cs-{{#sub:{{{2|5}}}|0|1}}}}
| de = {{Wikipedia|German language|de-{{#sub:{{{2|5}}}|0|1}}}}
| de = {{Wikipedia|German language|de-{{#sub:{{{2|5}}}|0|1}}}}
| el = {{Wikipedia|Greek language|el-{{#sub:{{{2|5}}}|0|1}}}}
| en = {{Wikipedia|English language|en-{{#sub:{{{2|5}}}|0|1}}}}
| en = {{Wikipedia|English language|en-{{#sub:{{{2|5}}}|0|1}}}}
| fi = {{Wikipedia|Finnish language|fi-{{#sub:{{{2|5}}}|0|1}}}}
| fi = {{Wikipedia|Finnish language|fi-{{#sub:{{{2|5}}}|0|1}}}}
| fr = {{Wikipedia|French language|fr-{{#sub:{{{2|5}}}|0|1}}}}
| fr = {{Wikipedia|French language|fr-{{#sub:{{{2|5}}}|0|1}}}}
| gr = {{Wikipedia|Greek language|gr-{{#sub:{{{2|5}}}|0|1}}}}
| it = {{Wikipedia|Italian language|it-{{#sub:{{{2|5}}}|0|1}}}}
| it = {{Wikipedia|Italian language|it-{{#sub:{{{2|5}}}|0|1}}}}
| ja = {{Wikipedia|Japanese language|ja-{{#sub:{{{2|5}}}|0|1}}}}
| ja = {{Wikipedia|Japanese language|ja-{{#sub:{{{2|5}}}|0|1}}}}
Line 27: Line 28:
|    a '''native'''
|    a '''native'''
}} level of '''{{#switch:{{lc:{{{1}}}}}
}} level of '''{{#switch:{{lc:{{{1}}}}}
| cs = Czech
| de = German
| de = German
| el = Greek
| en = English
| en = English
| fi = Finnish
| fi = Finnish
| fr = French
| fr = French
| gr = Greek
| it = Italian
| it = Italian
| ja = Japanese
| ja = Japanese
Line 41: Line 43:
== 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>de</tt>, <tt>en</tt>, <tt>fi</tt>, <tt>fr</tt>, <tt>gr</tt>, <tt>it</tt>, <tt>ja</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>de</tt>, <tt>el</tt>, <tt>en</tt>, <tt>fi</tt>, <tt>fr</tt>, <tt>it</tt>, <tt>ja</tt>, <tt>tr</tt>.


* level: (Optional, default 5) a number in range 1..6:
* level: (Optional, default 5) a number in range 1..6:

Revision as of 00:03, 26 December 2020

Usage

{{UserLanguage|language|level}}

  • language: ISO 639-1 language code (full list available here). Supported so far: cs, de, el, en, fi, fr, it, ja, 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.
{{UserLanguage|en|2}}
en-2 This user is able to contribute with an intermediate level of English.