Not always the easiest thing to do, and there are many countries that use two or more languages as the primary, would require a big list of possiblities.. IE.. TLD for mexico is MX, but their native is spanish, would have to have a table to that mapped MX to spanish, etc..