What worked with us was "Ohhhh did you see a Duck/Truck" that way they think they aren't actually saying a word, and every time they say a word like that correct them. No laughing just as you would if they said any other word incorrectly. It worked for my niece and it worked for my two. And then when they get older change the tactics so that it suits the age. When Paris was little we told her they were bad words and she had to tell mummy/daddy he/she was very naughty. She loved the role reversal and as a result never said it herself. Now she has some music with a couple of bad words in it but our understanding is if she wants to listen to the music she is never to utter those words if I hear those words the music will be confiscated FOREVER. And so far so good