Template:label/documentation

Use this template, as described in 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 generates content using Module:labels/templates and Module:labels. Lists of all recognised labels can be found in the following modules: To search for a label in these data modules, search on this page starting at 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 Module talk:labels/data.
 * 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)

Usage
A label is placed before the definition, such as:


 * 1)  An insidious person.

,, and are all equivalent.  is preferred for conciseness.

The first parameter is the language code of the section in which the template is placed (e.g.  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,  helps to ensure that the same labels are used across the project. For instance,  and   both produce the same result, expanding to.

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  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.

Examples
Some examples to demonstrate the range of current functionality:
 * A single ad hoc context with no supporting template:


 * A single context with supporting template (for categorization and custom label-text):


 * Multiple contexts, with or without supporting templates:


 * Multiple contexts, with special built-in separator pseudo-contexts that replace the comma:


 * Qualifier/modifier pseudo-contexts whose supporting templates suppress following comma (by adding a  parameter):

Language-specific labels
An example of a language-specific label:

The label is only linked when the language code is  (representing Ancient Greek).

Redirecting labels
Certain labels are aliases that "redirect" to other labels, or are displayed as them.

If the wrong language code is used, in this case lua (German), the label will not be redirected.

Double angle bracket notation
Complex cases involving multiple contexts, especially those that involve pseudo-contexts, are often easier to format using double angle bracket notation. The following shows an example, first using pseudo-contexts and then the equivalent using double angle brackets:

Comma-separated arguments inside of double angle brackets are split if the comma is not followed by a space. You can also mix regular and double angle bracket arguments. For example, the following are all equivalent:

Suppressing canonicalization of labels
Labels are normally converted to their canonical forms, for consistency. For example, automatically displays as Australia rather than Australian. In some circumstances, however, this is undesirable. To suppress this, precede the label with an exclamation point. For example:

Forcing a label to display a particular way
An extension of the previous notation,, allows you to display as  in place of how it would normally display. This works both in regular and double angle bracket notation, for example:

Additional parameters

 * sort
 * Sortkey. Usually can be generated automatically from the page name.


 * 1
 * Don't add categories.

TemplateData
{	"params": { "1": {			"label": "language", "description": "The language of the current section", "example": "en", "type": "string", "required": true },		"2": {			"label": "label 1", "description": "first label", "example": "slang", "type": "string", "required": true },		"3": {			"label": "label 2", "description": "second label", "example": "Australia", "type": "string" },		"4": {			"label": "label 3", "description": "third label", "example": "UK", "type": "string" }	},	"description": "Use this template to label senses with restricted usage or grammatical information, in addition to that in the part-of-speech heading and headword line" }