Template:Namespace name/doc

Usage
This returns the proper namespace name, given the single parameter of its ID number, per Template:Namespaces. For example:



Plays well with Database report.

This does, more or less, the same thing as the magic word  (and it indeed incorporates that magic word to handle alphabetic input). However, it adds the functionality of parsing deprecated namespaces as well, like Book: and Gadget: et cetera.