A Godement theorem for locales