I just watched The Man Who Would be King for the Nth time. For those who don't know it, this is the film version of a short story by Rudyard Kipling about two Englishmen retired from the Indian Army who set off to become kings of the mythical Kafiristan. Along the way they acquire the services of a Gurkha called Billyfish, who among other things, serves as their interpreter.
If I have identified the languages correctly, Billyfish addresses the natives of Kafiristan in Urdu, but they reply in Arabic. Neither is really appropriate for the area, which is presumably intended to be in the general area of Afghanistan or the Northwest Frontier Province of Pakistan (though the people are depicted as non-Muslim). A guess is that linguistic authenticity was not a priority and that the film makers simply had the actors speak languages that they knew. The actor who played Billyfish, Saeed Jaffrey, is an Indian Muslim who speaks Urdu and Punjabi. The Kafiristanis were presumably played by local actors, which means they knew Arabic since the film was actually made in Morocco. But before I go too far with this speculation, perhaps someone more competent in Urdu and Arabic than I am can confirm or deny that these are indeed the languages spoken.