While a flag may work for some countries, don't forget that not all countries have a single official language.
Placing a South African flag on your site would confuse most South Africans as we have 11 official languages (probably a worst case scenario). But there are plenty of other countries with more than one widely spoken and/or official language.