Translation convention
The translation convention is a filmic and television storytelling device in which the characters within a fictional story are heard or seen speaking to each other not in their native language but instead in the language of the film's audience, and speaking their native language whenever foreigners are in earshot. Sometimes, some or all of the characters speak with an accent that reflects the actual language spoken in the fictional or historical story setting. The audience is generally expected to assume that the characters are speaking their native language being translated into the audience’s language, but sometimes the audience is expected to accept that the characters are actually speaking the audience’s language and pretending to not know the language whenever foreigners are in earshot. This concept has been used since the beginning of narrative sound film. It uses, among other things, a degree of suspension of disbelief. See also
Dramatic convention
Practice of dubbing foreign films

References

Narrative techniques
Cinematic techniques
Convention