You need to be realistic about this. Kids get to an age where swearing is cool and just what they do. They need to understand that there is a time and a place for everything. They need to pay attention to who is around them and be respectful of others.
I told my boys, "Look, I know you're going to swear. Here are the rules: Don't swear at school or in anyone's home. Don't swear around adults or kids who are younger than you. If you offend anyone, apologize and don't swear in front of them again."
This is actually an excellent teaching moment. There is a time and a place for everything we do. We might swear at home, but we don't at work (or vice versa). Kids have to learn it sometime and it's better learned from you than sticking your head in the sand and pretending they're not going to do it.