Yes this is old-school. Used to happen to my brother a lot when we were kids from one babysitter in particular (many many years ago). She'd run a little dish soap in the bathroom sink and make him take a teaspoonful (which he would then spit out) yuck! I do not believe that is an effective punishment (sure didn't stop him at the time)!
What I found effective with my son (now 20) was to explain that kids who use bad words use those words because they just do not know better words to use, they're just not very smart; same with adults but that it is not right to correct an adult if you hear them using bad language - if they hadn't figured it out by now they never would.
When my son got old enough and used bad language or mouthed-off (and believe me, he did so quite often). I would have him write an essay. I would give him a topic and expect a certain number of words and then check for spelling and punctuation.
Sometimes I would also have him look up descriptive words in the dictionary that he could have used instead of the swear words and have him write out the definitions four times. I feel this kind of exercise promotes helpful discussion and caused him to 'think' about his actions as he was writing. Also, he really hated writing essays and vocabulary words ;-) It definitely improved his penmanship!
Would not have worked with my older daughter as she loved to write - fortunately language was not an issue with her.
good luck Mamas!
W