Manual:$wgNamespacesWithSubpages

Details
The variable holds an array indicating which namespaces allow sub-pages. The array is indexed by the numeric namespace ID, and each array value is either 0 (no sub-pages) or 1 (sub-pages allowed).

See Help:Subpages

Enabling for a namespace
The normal way to enable subpages for a given namespace is to edit the  and insert the following:

Disabling for a namespace

 * 1) Disable subpages in the talk namespace (this is enabled by default)

Enabling for all namespaces
This assumes you have no more than 200 namespaces.

Default value
The default is to enable subpages, but not within the 'main' namespace. They are enabled only within talk pages and user pages.

''Note: Enabling on all 'talk' pages actually requires many entries in this array; one for each talk namespace. Each version of MediaWiki only went as far as the maximum namespace existing at the time.''