For example, German and French is spoken a lot in Inglorious Basterds. In the German and French dubbed version of those films, what language would be spoken in those scenes?
If a movie is made in German/French language and the dubbed version would be in, say, English, almost every spoken line will be in English. My experience from watching over 1K movies is that even if someone coughs in a movie, the coughing will be also be dubbed by the dubber.
But if a movie is primarily in English and there are some spoken parts in French/German, it usually depends on the studio and director. To preserve originality, they usually don't translate/dub the foreign language parts. Though, they do provide translation through caption, but not always. What I have seen is it more depends on how important that foreign dialogue part is. If it's important to the story and the film makers want the final viewers to understand that particular dialogue, they provide a translation through Caption or dub that part.
I am french and experienced this issue while watching The Hateful Eight. I first watched it in english and laughed a lot when they made jokes in french, talking about Paris and things like that. Then later I watched it in French and it was really awful. They made the choice to convert these jokes into french but it was really a nonsense. No one was laughing because it was even hard to tell it was jokes.
Another example from Pulp Fiction in which they talk about fast-foods and little differences in Europe. Travolta says that we call a "quarter pounder with cheese" a "Royal with cheese". Once again, the joke was translated weirdly and Travolta says in french that we call a "quarter pounder" a "Royal with cheese". But the exact point of the dialogue is to say that we french don't even know what is a quarter pounder so the dialogue became a bit of a nonsense too.
Also, it is a bit off-topic, but I used to play a japanese game in which a homosexual cooker was french and in the french version of this game this very character was italian. We french consider italians a bit like the world considers us, and they kind of used this to solve the problem.
Translators face a big issues when trying to solve this problem. Sometimes they speak the dubbed dialogue in the same langage but it really changes the meaning of the scene so I think they try to avoid to do this when they can.
Not a dubbed movie but a TV show. In LOST, Danielle Rousseau is the French woman in the original version but in the French version she's the German woman.