Help:Category

Definition from Wiktionary, the free dictionary
(Redirected from Help:Categories)
Jump to navigation Jump to search
See also Wikimedia's Meta-Wiki for this page.

Quick help:

  • To add an entry to a category, place [[Category:Category name]] on the page.
  • To see all the entries in a category, follow (that is, click on) the hyperlink with the category name located at the bottom of the page.

The categorization facility provided by the MediaWiki software is a powerful tool for automating the creation of lists. Whenever you think of creating a list of words, consider creating a category instead. Unlike lists, categories are updated automatically. There is no need, as there is with lists, to maintain links in two places - the list and the individual entries within it. Categories are very useful for finding similar words or subjects and for finding "gaps".

How-to[edit]

How to add pages to categories[edit]

To add a page to a category, simply add a wikilink to the full category title. For example, to add the entry for apple to Category:English nouns, simply edit the English section of the entry and add [[Category:English nouns]] at the bottom.

The category link will not appear in the text of the entry. Instead, a link to the category will appear in a box at the bottom of the entry, and the category page Category:English nouns will contain a link to the apple entry.

In entries with multiple language sections, place category links inside the appropriate section. A category relating to English goes in the English section, one relating to Chinese goes in the Chinese section, and so on. (Wiktionary does not put all of the category links at the bottom of the page as Wikipedia does.)

In many cases, categories are added automatically by templates. For example, the {{en-noun}} template adds the entry apple to Category:English nouns.

How to link to categories[edit]

To display a category link, put a colon before the full page name in the wikilink. For example, to create the link Category:Languages, enter [[:Category:Languages]]. Using [[Category:Languages]] with no colon at the beginning does not display a link; it simply puts the page in the category.

How to create a category[edit]

To create a new category, you will first have to enter some metadata about the category (at minimum, the name, description, and parent category) on a page under Module:category tree. If you wish to make a topic category, choose an appropriate subpage under Module:category tree/topic cat. Otherwise, choose from among the subpages of Module:category tree/poscatboiler/data. For example, if you wished to make a topic category for unicycling, the most appropriate module would be Module:category tree/topic cat/data/Transport. You would then add (in the appropriate position, alphabetically) something like:

labels["unicycling"] = {
	description = "{{{langname}}} terms related to [[unicycle]]s and [[unicycling]].",
	parents = {"cycling"},
}

Generally, it should be straightforward to pattern the entry for your new category off of existing examples, but you can find detailed documentation for all the possible fields and their syntax at Module:category tree/poscatboiler/data/documentation.

Creating category pages[edit]

Navigate to the category page you wish to create (e.g. Category:Unicycling). Note that (unlike the main and template namespaces) category pages are always capitalized, even if you specified a lowercase string label in the module data. In most cases, category pages can simply be created with the content {{auto cat}}, which automagically inserts the appropriate "category boilerplate template" (catboiler for short). For more information, see the documentation for {{auto cat}} and see Category:Category boilerplate templates for a list of these catboiler templates.

In most cases (unless you created a language-specific category, somewhere under Module:category tree/poscatboiler/data/lang-specific) you will need to create an "umbrella category" (e.g. Category:Unicycling) and separately create language-specific category pages for each language you intend to populate (e.g. Category:en:Unicycling). Non-topic categories use a different naming scheme — for example, if we had added a category with label "unicycling slang" at Module:category tree/poscatboiler/data/terms by usage, this would give rise to umbrella category Category:Unicycling slang by language, with language-specific subcategories having names like Category:Korean unicycling slang. When in doubt, it may be helpful to observe the structure of similar existing categories.

Be aware that because of caching and delayed updates, additions to categories may not appear immediately, and when creating category pages the red hyperlinks at the bottom of categorized entries may not immediately turn blue. The changes usually take a few minutes to appear. Changes to the structure of the category tree may take longer to appear. For example, after creating Category:Unicycling, it may take several hours for it to appear as a subcategory on the Category:Cycling page. You can force an immediate update by performing null edits on the affected categories.

Oriented graph[edit]

The MediaWiki software does not require that categories form a strict hierarchy. In general, it allows them to form a directed graph. However, with the exception of the maintenance categories, on Wiktionary the intent is for the categories to form an oriented graph with a single root at Category:Fundamental.