I could see the voice actor learning a sentence or two but on occasion the bit goes on for a couple minutes. I feel like with a cartoon it wouldn’t be that hard to find a stand in who sounds close enough or use whoever does the dubbing for that language.
I once asked Chris Parnell if he knew spanish since he speaks it a lot in Archer. He said they give them phonetic lines and he doesn’t know any languages besides english.
I don’t remember ever seeing them switch out the voice actors.
They just learn the bits in the other language. It’s not like it has to be good. Most of the time they totally butcher it, but who cares?
Mostly they would use the original voice actor. It’s more of a hassle to find and recruit talent that sounds similar and add them to a payroll, add a line in the credits, schedule voice recording times etc than getting the original to learn a paragraph in a foreign language. It’s not hard , like you said, but it’s a hassle and it takes time away from several people in different areas.
You would have exceptions of course, perhaps the show has very eccentric producers/directors and enough of a budget but when it comes to resource management a couple minutes of voice dialogue usually isn’t worth it.