Currently getPageLanguage() uses wfGetLangObj() on the database language when a database language exists. wfGetLangObj() returns a Language object when the language code is supported and returns $wgContLang when the language code is not supported.
Expected result: getPageLanguage() should continue with getting the language from the content handler when the language code from the database is not supported.
Other language functions like getPageViewLanguage() should do the same.