Manual:$wgNamespaceAliases

From MediaWiki.org

Jump to: navigation, search
Namespaces: $wgNamespaceAliases
Provide additional names for namespaces.
Introduced in version: 1.10.0 (r21720)
Removed in version: still in use
Allowed values: array of strings
Default value: array()

Other settings: Alphabetical | By Function


[edit] Details

These are alternate names for the primary localised namespace names, which are defined by $wgExtraNamespaces and the language file. If a page is requested with such a prefix, the request will be redirected to the primary name.

Set this to a map from namespace names to IDs. Example:

$wgNamespaceAliases = array(
        'Wikipedian' => NS_USER,
        'Help' => 100
    );

To add a single alias:

$wgNamespaceAliases['WP'] = NS_PROJECT;

[edit] Do not use space

Use underscores instead of spaces in namespace names. 'My Namespace' is an invalid name; use 'My_Namespace' instead.