(But that is what it is like with people speaking the SAME language too! )
It supposedly happened all the time with Italian genre films - such as Westerns - which would have international casts: Italian, American, Spanish, German etc. Clint Eastwood did not understand Italian. Frequently the majority of the cast would speak one language (such as English), but if a director found someone with an interesting FACE, language was not a problem. Actors would learn and listen for the last few words in whatever language their costars were speaking and then say their own lines!
I don't remember if this story is about Federico Fellini or Vittorio De Sica. Anyway, both those geniuses would work with superstar actors like Marcello Mastroianni, but in smaller roles they liked to cast interesting looking amateurs. These amateurs did not even have to learn any dialog: the director just had them COUNT for however long he wanted them to speak! "Uno, due, tre, quattro, cinque..." Then later the professional voice actors gave them perfect voice performances.