Template:Namespace
template
This template has been protected from editing to prevent vandalism. Please discuss changes on the talk page or request unprotection. |
This template is used in system messages. Changes to it can cause immediate changes to the Wikimedia user interface. To avoid major disruption, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Please discuss changes on the talk page before implementing them. |
This works similar to the magic word {{NAMESPACE}}, which returns the name of whatever namespace it's on (hence it says 'template' right now). All this does is assign new names to those values to make them a little easier to use in template messages.
This table compares the magic word to this template showing what each would display if in those namespaces.
Location | {{NAMESPACE}} | {{namespace}} |
---|---|---|
Main space | (nothing) | gallery |
Commons: pages | Commons | project page |
File: pages | File | media file |
User: pages | User | user page |
Categories | Category | category |
Templates | Template | template |
System messages | MediaWiki | system message |
Any talk page | Talk, User talk, Commons talk, File talk... | talk page |
All other pages are rendered as "page".
See also:
- {{Namespaces}} - for when a plural form is needed.
- {{I18n/namespace}} - translates namespaces
Note on localization
As templates like these are used directly within translations themselves, it would not make sense to have this autotranslate (the messages they are used in should be). Thus, when creating localized versions, you may use any names that are appropriate in your language (but please link them or categorize them with this template to help translators find them). In some languages, it may be appropriate to create additional/alternative forms of these functional templates. For example, {{Namespace/fi}}, {{Namespacepar/fi}}, and {{Namespacepluralgen/fi}} instead of the two in English.