M.,
I don't know how close to your daughter you are but something that may work is to take a weekend away with just your 12 year old daughter. The reason I say away is so that you are not distracted by your other daughter, husband, laundry, dinner etc.. and you can totally focus on your daughter, just you and her for 2 days. I would suggest planning some stuff that she would really enjoy doing, maybe a little shopping trip and stay in an inexpensive motel.
I think and know from experience being on the daughters sided that when you are alone with parent and have a lot of one on one time such as a weekend where you know they are all about you and will actually listen to everything you say since there are not distractions the child opens up ALOT.
I took a couple long trips with my dad when I was younger and they are some of my very best memories. I am so thankful that my dad took the time to cultivate a relationship with me to the extent that he did.
So while you are out you can wait until the second day and just flatly ask her why she likes to swear, does it make her feel cool around her friends, grown up, a little naughty and rebellious? I think that if she knows you are a safe person to talk to and you will really listen she will respond to you and answer your questions and then you two can talk open and honestly about different topics.
Just a side note here my brothers when they were younger thought it was super cool to swear and they would do in partly in rebellion of my slightly uptight parents, because they were boys (my husband said he went through this stage as well) and because they were just exploring new ways of communicating and their boundaries. Eventually they stopped using such strong language, the Lord convicted their hearts and they "grew up" a little and stopped. Not everyone does as you know though and I know that is what you want to avoid.
I think that listening and hearing what she has to say before any discipline takes place will be more effective and if she opens up you two can talk about what discipline you both this is appropriate for that kind of behavior.
So that is my idea, I hope you seriously think about it even though it will cost some money, think of the deposit you will have made in her life, for the rest of her life.
B.