ഫലകത്തിന്റെ സംവാദം:context

Page contents not supported in other languages.
വിക്കിനിഘണ്ടു സംരംഭത്തിൽ നിന്ന്

Documentation[തിരുത്തുക]

Use this template to provide contexual information for definitions, such as archaic, by analogy, chemistry, etc. In a dictionary entry, it is placed before the definition, such as:

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

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

Use of context also provides automatic categorization. For instance, the example above is categorized as Australian English and Slang. Likewise, any page labeled with math or maths will be automatically placed in Mathematics if the template is used.

Use in dictionary entries[തിരുത്തുക]

Use {{context}} on the definition line with one or more contextual labels. (Elsewhere, use {{sense}}, {{qualifier}} or {{italbrac}} instead.) Currently, up to nine parameters can be listed, as well as a lang parameter to specify language. For instance, the following will categorize gringo as Spanish slang:

# {{context|Latin America|slang|lang=es}} An [[American]].
  1. (Latin America, slang) 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 blue moon will still work, even though there is no "by extension" template:

# {{context|by extension}} A long time.
  1. (by extension) A long time.

If the first label is a context template or modifier, it isn't necessary to use {{context}} explicitly:

# {{Latin America|slang|lang=es}} An [[American]].
# {{astronomy|of a star}} Relatively small in size.

Certain modifiers such as mainly or often can also be used separately from the subsequent standard contextual label, although these should generally be used sparingly. One example of correct use is at grand poobah:

# {{usually|jocular}} Someone [[important]].
  1. (usually jocular) Someone important.

There are also special key words, and and or, the underscore (_) to indicate a space only, and the default comma (,) understood to mean “and”. Of these or is the most useful. The result will list the separate contexts as possibilities, as within the entry in the year of our Lord:

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

To add a sort key to the automatically generated categories, use skey=. This will always be followed by {{PAGENAME}} so it can be just the prefix.

Finding context labels[തിരുത്തുക]

If the correct category can be located, the standard label name should be listed before other entries in that category. For instance, in Category:Astronomy, Template:astronomy is listed at the top of the entries, indicating that {{astronomy}} and {{context|...|astronomy|...}} will automatically categorize the entry. In some cases there may be more than one template. For instance, Template:constellation and Template:star are also listed in Category:Astronomy as special cases.

For foreign language entries beginning with a language code prefix, be sure to check the corresponding English category, as most label templates are not language-specific. {{astronomy|lang=es}}, {{constellation|lang=pt}}, {{context|star|lang=zh}} etc. all work equally well.

There is also a collection of standard context labels, an automatically generated category. The label mathematics is standard, and it's simple to check that it appears in that category. Non-standard label templates will redirect to the standard ones. For instance, Template:math and Template:maths are both redirects to Template:mathematics. Thus any of the labels math, maths, or mathematics can be used with context and will provide the same result.

Creating label templates[തിരുത്തുക]

These examples should guide advanced users in the formation of new contextual label templates in the Template: namespace. Make sure to create the label template at the same name as the label, using lowercase unless the word is always capitalized.

Each template contains a call to context:

{{context {{{sub|}}}|label=(label)|topcat=(category)
|sub={{{sub|}}}|lang={{{lang|}}}|skey={{{skey|}}}
|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}}}

this generates a label, and places the entry in a topic category, using the language code if not English.

The label= parameter may be wikilinked, and may include an alternate.

The second and third lines are all magic, and should be exactly as given when possible, to facilitate a 'bot modification if required in future.

POS or POS like categories[തിരുത്തുക]

If the category is a POS type category, for example the idiomatic label template, use poscat=: poscat=idioms. (note in this case it should be lower case) If a language is specified, it will generate the category with the language name. If no category is desired, both topcat and poscat may be omitted. (There isn't a known case where both are required? It will work.)

{{context {{{sub|}}}|label=(label)|poscat=(category)
|sub={{{sub|}}}|lang={{{lang|}}}|skey={{{skey|}}}
|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}}}

Regional labels[തിരുത്തുക]

A country or regional label is written

{{context {{{sub|}}}|label=(region name)|regcat=(region adjective)|lang={{#if:{{{lang|}}}|{{{lang}}}|(xx)}}
|sub={{{sub|}}}|skey={{{skey|}}}
|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}}}

Where (region name) is the proper name of the country or region, (region adjective) is the adjectival form (e.g. for "Mexico", this is "Mexican", and (xx) is the default language to use. (Note that the lang parameter has to be defaulted as shown, the simpler form of parameter defaulting does not work with multiple labels.)

Modifiers[തിരുത്തുക]

A modifier is a label template that adds _ as its first parameter: ...|label=usually|_|... in Template:usually and does not use the category parameters.

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/monobook.css), as described in WT:CUSTOM.

Comments[തിരുത്തുക]

ദയവായി ഇംഗ്ലീഷ് വിക്ഷ്നറിയിലെ സംവാദം താൾ കാണുക.

"https://ml.wiktionary.org/w/index.php?title=ഫലകത്തിന്റെ_സംവാദം:context&oldid=109979" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്