I think that this happens especially often with Africa, for a number of reasons. First of all, nations correspond extremely poorly to indigenous languages on that continent, as opposed to Asia and Europe, where they merely correspond poorly. Thus if a German director had said something in some foreign language, it wouldn't be too hard to figure out what language he or she was speaking, or if Ang Lee said something in some other funny language (which he did) you can fairly certainly ascertain from the fact that he is from Taiwan that he was speaking Thai. Yes, II'm kidding. But if a South Africa says something foreign, all bets are off. An African dialect.
Another factor is that I think most Americans think of Africa as a fairly homogenous place, so that it's hard to pin down anything specific there. Sweden is Sweden and Italy is Italy, and though I think the differences between China and Japan are quite subtle (kidding again), most people are aware that differences exist. But Botswana? Nigeria? Tanzania? Who knows? An African dialect.
Finally, I think there is a lingering colonialist attitude, in spite of the progress of the last century, that makes people think of Africa as a primitive place, where maybe they don't even speak real languages. Languages are spoken in places where there are cathedrals, or maybe pagodas. An African dialect.
Okay, maybe I'm a bit too harsh in my judgement. There was a street slang in South Africa's Gauteng province called Tsotsitaal (the film's title "Tsotsi" means criminal in Arikaans, and Tsotsitaal means