You have a certain degree of care for the players especially minors. Here is how I would deal with it.
1. Short pause and get both managers. If you can get a home club/ground official, get them there too. Explain that you want abuse of players from side line stopped by whatever means they see fit. Restart the game straight after.
2. If it continue happening, stop the game. Get the ppl from step one. Tell them you are suspending the game for 5 minutes. They can use that time to do what they can do to stop the abbuse. You will restart after 5 minutes and if it continues you will abandon the game.
3. Restart after 5 minutes and if abuse continues abandon the game (or suspend indefinately).
I must add 'swearing' is a generic term. You do above for any continued OFFINABUS from sideline towards players.