Help:Categories
From STIQ
| Important note: When you edit this page, you agree to release your contribution into the public domain. If you don't want this or can't do this because of license restrictions, please don't edit. This page is one of the Public Domain Help Pages, which can be freely copied into fresh wiki installations and/or distributed with MediaWiki software; see Help:Contents for an overview of all pages. |
MediaWiki allows you to categorize pages by adding one or more category tags to the text. Adding these tags create links at the bottom of the article which take you to the list of all pages in that category, which makes it easy to browse related articles.
Contents |
How to add categories
To add an article to a category put the following at the end of the page you are editing...
[[Category:{Name}]]
where {Name} is the name of the category you want to add it to. Any number of category tags may be added to the page - the page will be listed in all of them.
You can also specify an additional {Sort} parameter that dictates where the page will appear, alphabetically, within the category. This is achieved by using the following markup:
[[Category:{Name}|{Sort}]]
So for example, to add this page to the 'Help' category, you would use:
[[Category:Help|Categories]]
Note that we used 'Categories' as the sort parameter. Without this the page would be listed under 'H' for 'Help:Categories', instead of under 'C', which is more useful. Other situations where you might want to use the sort parameter is when you have articles about people that are titled as FirstName LastName but within the category you want them listed as LastName, FirstName.
Another way to sort the article in the correct letter without the namespace is
[[Category:Help|{{SUBPAGENAME}}]]
This is extremely helpful when using templates which include a category tag.
Note: the {sort} parameter does not affect how the page title is displayed within the category listing, just how it is ordered. In the above example, the link to this page will still be 'Help:Categories', and not 'Categories' as you might expect!
Linking to Category Pages
To create a link to a category page:
[[:Category:{name}]]
If you were linking to the Category Page for Help on MediaWiki, the link would look like this: Category:Help
If you want to display alternate text for the link:
[[:Category:{name}|{alternate text}]]
Here is an example of the same link to the Category Page for Help on MediaWiki as above, but with alternative text: MediaWiki Help Index
Categorize Categories
Categories themselves and other uploaded files like Pictures can be categorized exactly like normal pages. It is useful to connect the article-categories with categories already in place to establish connections and hierarchies. To this end, after saving the article, follow the category links at the end of the page to see, if the category is already in place and if not, categorize them until you connect them with an existing category.
See also
>== Template ==
<onlyinclude><div class="LanguageLinks">
<table width="100%">
<tr valign="top" style="background: #EEF3E2">
<td style="width: 25px; padding-left: 0.5em;">
</td>
<td style="width: 10px; white-space: nowrap; padding: 4px 1em 0 0.5em; border-right: 1px solid #aaaaaa;">Languages: </td><td style="padding: 1px 1em 0; background: #F6F9ED;">
English
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/ar | • {{#if: Help:Categories|العربية| العربية}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/br | • {{#if: Help:Categories|Brezhoneg| Brezhoneg}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/ca | • {{#if: Help:Categories|Català| Català}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/cs | • {{#if: Help:Categories|Česky| Česky}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/de | • {{#if: Help:Categories|Deutsch| Deutsch}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/el | • {{#if: Help:Categories|Ελληνικά| Ελληνικά}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/es | • {{#if: Help:Categories|Español| Español}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/fa | • {{#if: Help:Categories|فارسی| فارسی}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/fi | • {{#if: Help:Categories|Suomi| Suomi}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/fr | • {{#if: Help:Categories|Français| Français}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/he | • {{#if: Help:Categories|עברית| עברית}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/hu | • {{#if: Help:Categories|Magyar| Magyar}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/id | • {{#if: Help:Categories|Bahasa Indonesia| Bahasa Indonesia}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/it | • {{#if: Help:Categories|Italiano| Italiano}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/ja | • {{#if: Help:Categories|日本語| 日本語}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/ko | • {{#if: Help:Categories|한국어| 한국어}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/mr | • {{#if: Help:Categories|मराठी| मराठी}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/nl | • {{#if: Help:Categories|Nederlands| Nederlands}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/no | • {{#if: Help:Categories|Norsk (bokmål)| Norsk (bokmål)}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/oc | • {{#if: Help:Categories|Occitan| Occitan}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/pl | • {{#if: Help:Categories|Polski| Polski}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/pt | • {{#if: Help:Categories|Português| Português}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/ro | • {{#if: Help:Categories|Română| Română}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/ru | • {{#if: Help:Categories|Русский| Русский}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/sq | • {{#if: Help:Categories|Shqip| Shqip}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/sr | • {{#if: Help:Categories|Српски / Srpski| Српски / Srpski}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/sv | • {{#if: Help:Categories|Svenska| Svenska}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/th | • {{#if: Help:Categories|ไทย| ไทย}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/vi | • {{#if: Help:Categories|Tiếng Việt| Tiếng Việt}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/yue | • {{#if: Help:Categories|粵語| 粵語}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/zh | • {{#if: Help:Categories|中文| 中文}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/zh-hans | • {{#if: Help:Categories|中文(简体)| 中文(简体)}}|}}
{{#ifexist: {{#if: Help:Categories | Help:Categories | {{#if: Help | Help:}}Categories}}/zh-hant | • {{#if: Help:Categories|中文(繁體)| 中文(繁體)}}|}}
</td></tr></table></div></onlyinclude>
Syntax
{{{Languages|PageName}}}
- PageName (optional) - the name of the page to display language links for. If omitted then the English version of the current page is used. This parameter can normally be omitted, as it is only required if you want to link to a page other than the one you place the template on, which is very uncommon. If this parameter is used on a sub-page make sure you supply the root name, not the full page name (e.g. on MediaWiki/fr you would need to use
{{{Languages|MediaWiki}}}and not{{{Languages|MediaWiki/fr}}}).
Usage
The template should only be placed on pages that exist in more than one language, and it should be placed in the same location on each translation of the page.
The English version of a page is always the main version, with all other languages as sub-pages, named using the appropriate language code (see below).
For example, on the Main Page you would include the text {{{Languages}}}, both on Main Page itself, and on each of its language sub-pages. The template automatically creates links to any language sub-pages that exist, e.g. Main Page/ja<tt>, <tt>Main Page/fr, and ignores non-existant languages.
See Project:Language policy for further details about translating pages.
Supported languages
This shows you the name of each language's sub-page (using Main Page as an example). Other languages may be added easily as necessary. Please use the appropriate prefix, as used on Wikipedia when adding a new language. Please do not add languages for which no pages exist yet, as this will increase the time needed to include the template without adding any benefit (languages are only displayed to the user when the relevant page exists).
The link on the language names goes to the Wikipedia in that language. If no Wikipedia in your language exists, do not add pages in that language to MediaWiki.org! This wiki is not the place for language advocacy - please go through the correct channels, and once your language has a Wikipedia then please return to add content here.
| Page Name | Language |
|---|---|
| Main Page | English |
| Main Page/ar | Arabic |
| Main Page/br | Breton |
| Main Page/ca | Catalan |
| Main Page/cs | Czech |
| Main Page/de | German |
| Main Page/el | Greek |
| Main Page/es | Spanish |
| Main Page/fa | Persian |
| Main Page/fi | Finnish |
| Main Page/fr | French |
| Main Page/he | Hebrew |
| Main Page/hu | Hungarian |
| Main Page/id | Indonesian |
| Main Page/it | Italian |
| Main Page/ja | Japanese |
| Main Page/ko | Korean |
| Main Page/mr | Marathi |
| Main Page/nl | Nederlands |
| Main Page/no | Norwegian |
| Main Page/oc | Occitan |
| Main Page/pl | Polish |
| Main Page/pt | Portugese |
| Main Page/ro | Romanian |
| Main Page/ru | Russian |
| Main Page/sq | Albanian |
| Main Page/sr | Serbian |
| Main Page/sv | Swedish |
| Main Page/th | Thai |
| Main Page/vi | Vietnamese |
| Main Page/yue | Cantonese |
| Main Page/zh | Chinese |
| Main Page/zh-hans | Chinese (Simplified) |
| Main Page/zh-hant | Chinese (Traditional) |
Example
Here is how the language bar looks on the MediaWiki page: Languages
