I mean if the language is not appropriate at school, then the school should educate them. There's plenty other behaviours expected at a school - that the school teaches them - that isn't expected at the home or other places.
I'm not sure which comment you're reading, but the person you're replying to is talking about their friend's policy which explicitly states that there exist some people who you probably shouldn't swear around. It just isn't dad