Jump to content

Загвар:Babel field

Википедиа — Чөлөөт нэвтэрхий толь
{{{lang_code}}}-{{{lang_level}}} {{{text}}}

This template, together with {{Babel}}, is the basis for the userboxes to declare your language skills. You can use it to implement individual language skill labels. The label template for native speakers will be named "User <code>", where code usually is the shortest ISO 639 code available for each language. The other skill levels use a number after a dash, from "User <code>-0" to "User <code>-5" (numbers explained below). For English, that would result in "User en", and "User en-0" to "User en-5".

Once the necessary label templates exist, they can be used with {{Babel}}. On your user page, insert something like the following:


This example will display labels for a native Mongolian speaker, with additional skills in English, Russian, and Japanese, in decreasing order of proficiency (see the documentation of {{Babel}} for some other options, as well as the section "Person" below).

The labels will have different colors for each skill level. they will also add the user page (and themselves) to several categories. For each language, a general category for all speakers ("User <code>"), and a specific category for each skill level ("User <code>-0" to "User <code>-5" and "User <code>-N"). The specific categories should be subcategories of their general language category, which again is a subcategory of Category:Babel.

When creating language labels, you simply include this template, and pass it appropriate values for the following parameters:

  • lang_target - (optional) If an article with that title exists, then the displayed language code will be linked to it.
  • lang_code - two (or more) letter code
  • lang_level - the skill level, with values:
    • N - native speaker (grown up with this language)
    • 5 - professional skills (writes this language for a living)
    • 4 - near-native skills (usually passes for a native speaker)
    • 3 - advanced skills (can write non-trivial text)
    • 2 - intermediate skills (can write simple text)
    • 1 - low skills (can read simple text)
    • 0 - no skills (only use this, when the context would otherwise imply that you might speak a language)
  • text - Text message on label

The last two parameters should only be used when the language code is longer than usual:

  • lang_label - (optional) show a different label in the left box. This is useful when the lang_code is long, and a less formal shorter version is available: Example: "zh-min-nan" vs "nan" (or "zh-min -nan" to enable a line break).
  • lang_size - (optional, default 1.5em) left box font size. This may be useful if lang_label isn't enough to keep the left box from stretching.

Language labels may support gender (or other) specific text. The babelbox passes the named argument "person" to the label templates unchanged for this purpose. Standard values are:

  • n for neutral text (ene khun...)
  • m for male text (ene eregtei khun ...)
  • f for female text (ene emegtei khun...)
  • 1 for first person text (chi...)

Note that not all choices will make sense for all languages. If no "person" argument is specified, or its value isn't supported, then a default text will be shown, as specified by the creator of the label (see examples below).

The supporting {{Babel navbar}} takes the language code as its sole and mandatory argument. You can insert it in a <noinclude> section of your label templates, as a simple way to navigate between the different skill levels of each language.

{{Babel field
| lang_target  = Англи хэл
| lang_code    = en
| lang_level   = N
| text         = {{#switch: {{{person|}}} | 1 = I am | This user is
}} a '''[[:Category:User en-N|native]] [[:Category:User en|English speaker]]'''. 

person = 1
{{User en|person=1}}

comments about template

{{Babel navbar|en}}

interwiki links

{{Babel field
| lang_target  = герман хэл
| lang_code    = de
| lang_level   = 1
| text         =  {{#switch: {{{person|}}} | 1 = Ich habe |
 f = Diese Benutzerin hat |  Dieser Benutzer hat 
 }} '''[[:Category:User de-1|grundlegende]] [[:Category:User de|Deutschkenntnisse]]'''.

person = f
{{User de-1|person=f}}
person = 1
{{User de-1|person=1}}

comments about template

{{Babel navbar|de}}

interwiki links