If you don’t use foul language yourself, you can expect your children to avoid using it.
If they say, “But Uncle Frank says that!” you can say:
I am not Uncle Frank’s mother. It is not my place to correct Uncle Frank. I am your mother. It is my place and my duty to correct you. You are not to talk like that. May I remind you, too, young man/lady, that you are not going to be outstanding in any way if you use the way other people act as an excuse for your bad behavior.
Do I see you trying to do better at the things Uncle Frank does more nicely than you do? No, I am sorry, but I haven’t noticed any of that. Next time, I want to see that you’ve looked at what Uncle Frank does that is the most praiseworthy, and imitate that. Did you see how nicely he looked out for Grandma, how he noticed her water needed to be filled and took care of it without being told? How he offered to change channels to watch what Uncle Bob wanted to watch, instead of his own show? How he went and got Aunt Beth’s coat for her and held it up for her to put on when it was time to go? Imitate those things, not the things you’re not allowed to do.