That assumes that (i) every region has a primary language, and (ii) everyone in that region speaks that language, both of which are false.
(And false often enough that guessing language based on IP address works badly in practice, I hear.)