Template:label

Definition from Wiktionary, the free dictionary
(Redirected from Template:lbl)
Jump to: navigation, search

(example)


Use this template, as described in Wiktionary:Context labels:

  1. To label senses with restricted usage
  2. To label senses with grammatical information, in addition to that in the part-of-speech heading and headword line

This template uses Module:labels as a back-end. A list of all recognised labels can be found at Module:labels/data.

Usage[edit]

A label is placed before the definition, such as:

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

Note that {{lb}}, {{lbl}} and {{label}} are all equivalent; {{lb}} is preferred for conciseness.

The first parameter is the language code (e.g. en for English); see WT:LANGLIST for the full list. Further parameters are context labels.

This template provides consistency. The same visual result could be achieved with simpler formatting; however, lb helps to ensure that the same labels are used across the project. For instance, {{lb|en|math}} and {{lb|en|maths}} both produce the same result, expanding to (mathematics).

Use of a context label also provides automatic categorization. For instance, the example above is categorized as Australian English and Slang. Likewise, any page with a context of math or maths will be automatically placed in category Mathematics. However, these templates 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.

Examples[edit]

Some examples to demonstrate the range of current functionality:

  • A single ad hoc context with no supporting template:
    • {{lb|en|foobarbazbip}}(foobarbazbip)
  • A single context with supporting template (for categorization and custom label-text):
  • Multiple contexts (up to about nine), with or without supporting templates:
    • {{lb|en|foobar|bazbip}}(foobar, bazbip)
    • {{lb|en|Australia|slang}}(Australia, slang)
    • {{lb|en|foobar|slang}}(foobar, slang)
    • {{lb|en|Australia|foobar|bazbip}}(Australia, foobar, bazbip)
  • Multiple contexts, with special built-in separator pseudo-contexts that replace the comma:
    • {{lb|en|foobar|_|bazbip}}(foobar bazbip)
    • {{lb|en|foobar|_|bazbip|slang}}(foobar bazbip, slang)
    • {{lb|en|foobar|or|bazbip}}(foobar or bazbip)
    • {{lb|en|foobar|and|bazbip}}(foobar and bazbip)
    • {{lb|en|foobar|and|bazbip|or|Australia}}(foobar and bazbip or Australia)
    • {{lb|en|Australia|or|foobar}}(Australia or foobar)
  • Qualifier/modifier pseudo-contexts whose supporting templates suppress following comma (by adding a _ parameter):
    • {{lb|en|chiefly|foobar}}(chiefly foobar)
    • {{lb|en|of a|person}}(of a person)

Notes[edit]

  • {{indtr}} is a separate context label template used in Portuguese. It should probably be converted to Lua, eventually.

See also[edit]