You can watch examples of this in the following Danny Kaye video that compiles scenes from several of his movies:
Or in Chaplin's "The Great Dictator" too:
In short, it's all about mimicking intonation, sounds, even gestures of the foreign speakers, as perceived to the speakers of your own language, just to give the impression that you're actually speaking the foreign one.
I think it's mainly used in humor:
Is there a term (verb or noun) for this gibberish just to fake you speak a foreign language? Is this a rhetorical figure with a name?
- This scene is an example of an improvised [rh.fig.] by Charles Chaplin.
Or may be there exists a verb:
- Danny Kaye usually [verb]s in his movies.