Resonant photoemission in highly localized versus weakly localized solids