Template:label
(example)
- The following documentation is located at Template:label/documentation. [edit]
- Useful links: subpage list • links • redirects • transclusions • errors (parser/module) • sandbox (diff)
This template generates a context label. It is to be used, as described in Wiktionary:Context labels:
- To label senses with restricted usage
- To label senses with grammatical information, in addition to that in the part-of-speech heading and headword line
This template generates content using Module:labels/templates and Module:labels. Lists of all recognised labels can be found in the following modules:
- Module:labels/data
- Module:labels/data/regional
- Module:labels/data/topical
- Module:labels/data/qualifiers
- Module:labels/data/lang/en (for English-specific labels)
- Module:labels/data/lang/grc (for Ancient-Greek-specific labels)
- Module:labels/data/lang/yo (for Yoruba-specific labels)
- ... (for about 250 languages currently)
To search for a label in these data modules, search on this page starting at #Defined labels or use the search box on the right. To add a label, go to the appropriate data module and follow the directions in the documentation page, or ask someone else to add the label at Template talk:label.
Usage
A label is placed before the definition, as in this example:
# {{lb|en|AU|colloquial|pejorative}} An [[insidious]] person.
…which generates:
- (Australia, colloquial, derogatory) An insidious person.
{{lb}}, {{lbl}}, and {{label}} are all equivalent. {{lb}} is preferred for conciseness.
The first parameter is the language code of the section in which the template is placed (e.g. en for English); see WT:LANGLIST for the full list. Further parameters are labels, most of which indicate usage context, or label modifiers.
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, 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.
{{lb}} is not meant to be used after a headword line. If a context label applies to all senses in a headword, the label can be placed after the headword template with {{tlb}} or {{term-label}}.
Examples
Some examples to demonstrate the range of current functionality:
- A single ad hoc context with no supporting template:
{{label|en|foobarbazbip}} |
→ | (foobarbazbip) |
- A single context with supporting template (for categorization and custom label-text):
{{label|en|Australia}} |
→ | (Australia) |
{{label|en|transitive}} |
→ | (transitive) |
- Multiple contexts, with or without supporting templates:
{{label|en|foobar|bazbip}} |
→ | (foobar, bazbip) |
{{label|en|Australia|slang}} |
→ | (Australia, slang) |
{{label|en|foobar|slang}} |
→ | (foobar, slang) |
{{label|en|Australia|foobar|bazbip}} |
→ | (Australia, foobar, bazbip) |
- Multiple contexts, with special built-in separator pseudo-contexts that replace the comma:
{{label|en|foobar|_|bazbip}} |
→ | (foobar bazbip) |
{{label|en|foobar|_|bazbip|slang}} |
→ | (foobar bazbip, slang) |
{{label|en|foobar|or|bazbip}} |
→ | (foobar or bazbip) |
{{label|en|foobar|and|bazbip}} |
→ | (foobar and bazbip) |
{{label|en|foobar|and|bazbip|or|Australia}} |
→ | (foobar and bazbip or Australia) |
{{label|en|Australia|or|foobar}} |
→ | (Australia or foobar) |
{{label|en|Australia|_|foobar|;|British|_|bazbip}} |
→ | (Australia foobar; UK bazbip) |
- Qualifier/modifier pseudo-contexts whose supporting templates suppress following comma (by adding a
_parameter):
{{label|en|chiefly|foobar}} |
→ | (chiefly foobar) |
{{ |