I’m not sure about cats but the way dogs understand human language is that they listen to intonations and certain frequency patterns. They are better at understanding emotions so if you will say “good boy” but make your voice sound angry they will think you are angry. When dogs learn commands and tricks they learn to recognize certain patterns of sound so if you say “zit” instead of “sit” for example they will probably understand you. Switching to a language that has unfamiliar sound patterns will obviously confuse them but eventually they will learn to understand it so I guess dogs can learn a second language.
Cats though, they are different. Dogs has been shown to learn our language, which includes body language, facial expressions and tone of voice (I guess my dog is more social than me, an autistic person). Cats on the other hand expect you to learn their language! That’s why they do all of the confusing things like brush against your legs or lick your palm. They aren’t interested in learning “human”, they express themselves the same way they do around other cats. So I doubt they recognize much of human language except for their name and “come eat”. I don’t recall reading any research on that though so I might be wrong.