Jump to content

Wiktionary:Context labels

From Wiktionary, the free dictionary

Use {{lb}} to indicate grammatical or restricted-usage information about definitions, as described in Entry Layout Explained. Context labels may indicate:

Grammatical information about a definition:

  • A certain grammatical function or property (for example, auxiliary, uncountable, plural only, passive)

Restricted usage of a definitions:

  • Within a geographic or dialectal region (Australian, Flemish, Northumbrian)
  • By technical or specialized subject field (banking, medicine, sports)
  • Some other context (archaic, historical, slang, vulgar, etc).
  • Some labels qualify the usage of other context labels (chiefly).

The context is placed before the definition, such as:

# {{lb|en|Australia|slang}} An [[insidious]] person.
  1. (Australia, slang) An insidious person.

Use of a context label can provide automatic categorization. For instance, the example above is categorized as Category:Australian English and Category:English slang. Likewise, any page with a context of math or maths will be automatically placed in category Category:en:Mathematics. However, context labels should not be used merely for categorization. It is still preferable to list a [[Category: ]] when there is no specific context for a term.

Regions are meant to indicate where a term is used, not to specify location of an entity. For instance, the Sphinx in Giza should not be labeled Egypt. Rather, that's part of the definition. Also note that time and space are not contexts. The word “week” is understood to mean seven days whether one is discussing war or widgets or the weather, in speech or song or storybook.

Use in dictionary entries

Use {{lb}} before definitions, with one or more contextual labels. (Elsewhere, use {{sense}} or {{qualifier}} instead.) If an entry contains more than one definition and all of them have the same context, the context label should be repeated for every definition. Specify the language with the |lang= parameter. For instance, the following will categorize gringo in Category:Spanish derogatory terms:

# {{lb|es|pejorative}} An [[American]].
  1. (derogatory) An American.

If a label is recognized, it may be automatically substituted with a standard label, and the page may be automatically categorized. If a label is not recognized, the text will be shown regardless. For instance, the following code on in will still work, even though there is no "with accusative" label defined:

# {{lb|de|with accusative}} [[into]].
  1. (with accusative) into.

There are also special key words and and or, and the underscore (_) to indicate a space only, suppressing the comma. The result will list the separate contexts as possibilities, as within the entry in the year of our Lord:

# {{lb|en|archaic|or|religious}} [[anno domini|Anno domini]].
  1. (archaic or religious) Anno domini.

The default comma (,) is understood to mean “and”.

The sort key is automatically generated through format_categories, and will be correct in most circumstances. To add a custom sort key to the categories, use the |sort=.

Finding context labels

All recognised labels are listed in Module:labels/data, along with any customised display and/or a list of categories that they add entries to. "Aliases" work like redirects, and will make one label equivalent to another label. For instance, math and maths are both aliases of the standard label mathematics. Thus any of the labels math, maths, or mathematics will provide the same result when used.

Customization

Readers can customize the display of definition context qualifiers. Your current style is this:

  1. (context like this, your current style) a definition....

Some readers prefer custom styles:

  1. (context like this, non-italic) a definition....
  2. (context like this, mostly italic) a definition....
  3. (context like this, all italic) a definition....
  4. (context like this, non-italic) a definition....
  5. Context like this, small-caps and no parentheses a definition...
  6. (Context like this, small font) a definition

This template allows readers to choose such custom formats using WT:PREFS or by editing your personal CSS file (e.g. Special:Mypage/Common.css), as described in WT:CUSTOM.