UserLanguage – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<tt>([^ =]+)<\/tt>" to "{{hl|$1}}")
m (Fix Wikipedia link)
Line 10: Line 10:
}}"
}}"
{{!}} 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}}}}
| cs = {{Link|https://en.wikipedia.org/wiki/Czech_language|cs-{{#sub:{{{2|5}}}|0|1}}}}
| da = {{Wikipedia|Danish language|da-{{#sub:{{{2|5}}}|0|1}}}}
| da = {{Link|https://en.wikipedia.org/wiki/Danish_language|da-{{#sub:{{{2|5}}}|0|1}}}}
| de = {{Wikipedia|German language|de-{{#sub:{{{2|5}}}|0|1}}}}
| de = {{Link|https://en.wikipedia.org/wiki/German_language|de-{{#sub:{{{2|5}}}|0|1}}}}
| el = {{Wikipedia|Greek language|el-{{#sub:{{{2|5}}}|0|1}}}}
| el = {{Link|https://en.wikipedia.org/wiki/Greek_language|el-{{#sub:{{{2|5}}}|0|1}}}}
| en = {{Wikipedia|English language|en-{{#sub:{{{2|5}}}|0|1}}}}
| en = {{Link|https://en.wikipedia.org/wiki/English_language|en-{{#sub:{{{2|5}}}|0|1}}}}
| fi = {{Wikipedia|Finnish language|fi-{{#sub:{{{2|5}}}|0|1}}}}
| fi = {{Link|https://en.wikipedia.org/wiki/Finnish_language|fi-{{#sub:{{{2|5}}}|0|1}}}}
| fr = {{Wikipedia|French language|fr-{{#sub:{{{2|5}}}|0|1}}}}
| fr = {{Link|https://en.wikipedia.org/wiki/French_language|fr-{{#sub:{{{2|5}}}|0|1}}}}
| it = {{Wikipedia|Italian language|it-{{#sub:{{{2|5}}}|0|1}}}}
| it = {{Link|https://en.wikipedia.org/wiki/Italian_language|it-{{#sub:{{{2|5}}}|0|1}}}}
| ja = {{Wikipedia|Japanese language|ja-{{#sub:{{{2|5}}}|0|1}}}}
| ja = {{Link|https://en.wikipedia.org/wiki/Japanese_language|ja-{{#sub:{{{2|5}}}|0|1}}}}
| pl = {{Wikipedia|Polish language|pl-{{#sub:{{{2|5}}}|0|1}}}}
| pl = {{Link|https://en.wikipedia.org/wiki/Polish_language|pl-{{#sub:{{{2|5}}}|0|1}}}}
| sk = {{Wikipedia|Slovak language|sk-{{#sub:{{{2|5}}}|0|1}}}}
| sk = {{Link|https://en.wikipedia.org/wiki/Slovak_language|sk-{{#sub:{{{2|5}}}|0|1}}}}
| sl = {{Wikipedia|Slovene language|sl-{{#sub:{{{2|5}}}|0|1}}}}
| sl = {{Link|https://en.wikipedia.org/wiki/Slovene_language|sl-{{#sub:{{{2|5}}}|0|1}}}}
| tr = {{Wikipedia|Turkish language|tr-{{#sub:{{{2|5}}}|0|1}}}}
| tr = {{Link|https://en.wikipedia.org/wiki/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 52: 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: {{hl|cs}}, {{hl|da}}, {{hl|de}}, {{hl|el}}, {{hl|en}}, {{hl|fi}}, {{hl|fr}}, {{hl|it}}, {{hl|ja}}, {{hl|pl}}, {{hl|sk}}, {{hl|sl}}, {{hl|tr}}.
* 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|cs}}, {{hl|da}}, {{hl|de}}, {{hl|el}}, {{hl|en}}, {{hl|fi}}, {{hl|fr}}, {{hl|it}}, {{hl|ja}}, {{hl|pl}}, {{hl|sk}}, {{hl|sl}}, {{hl|tr}}.


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

Revision as of 00:22, 24 February 2023

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}}
sk-5 This user is able to contribute with a native level of Slovak.
{{UserLanguage|sl}}
sl-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.