Problem
There isn't a way to determine if a wiki namespace is a default namespace or not and it is not documented what even makes a namespace a default namespace.
Use case
For software to interact with a (page namespace ID, page title) pair and know whether it is safe to localise in the current wiki context. If the namespace ID is from an extension, then this may be something else on a different wiki, or not expected to exist locally, and thus should not be localized.
See also T200938