A lot of writers worry about the use of bad language in their work. It is a legitimate concern, depending on the audience you are writing for. Some writers abhor the use of expletives and curses, choosing to avoid it entirely. Some writers dump expletives with abandon, and pepper their dialog with spicy adjective sandwiches. Most of us, however, use them when they’re needed and when they fit. In YAF writing, I avoid them in favor of younger equivalents, like “rats,” and “dang,” and such. But in adult writing, I use them when I feel they’re necessary, which doesn’t mean all the time, and doesn’t mean never.
Certain characters swear in certain situations. Eliminate the cursing and it seems odd to many readers - including myself. Other characters don’t swear or use expletives, and for them to do so out of character also appears obvious and artificial. And, by obvious, I mean the author made the decision to swear or not to swear, but the character didn’t make that decision. They created a character that should curse, and then sanitized them. This disturbs me, though not to the point that I’d put the book down if the plot were good.
If you create a character that should swear – then let that character swear. If not, then don’t. Circumstances may warrant a shift in terminology, but that’s up to the author to make obvious. I’ve spent enough time in the military to find it odd when military characters don’t swear. And I’ve spent enough time around those with delicate sensibilities to find it really jarring when they do swear. So, for me, when I’m writing, it’s salt and pepper. Season carefully, but don’t over season and don’t under season.
As for the actual expletives and swears (I consider these different things), there are many routes to take.
A character may go off in a foreign language (maybe one you made up) and you can show the depth of that by shrewd physical descriptions of the reactions of other characters who do speak that language. In this way, you get away with swearing entirely without even having to swear, or curse, or use an expletive.
Then there are insults, none of which need to include an expletive or swear. Calling someone a “mouth-breather” for instance, a perfectly good insult without an single expletive or curse. If you want to go this route with insults, you should check out The Shakespearean Insult Kit.
Then there are swears, which are usually religious in nature, and not necessarily taking a God’s name in vain (which implies without expecting aid from a deity). However, many times (probably the majority) they are taken in vain. The point is, it’s perfectly legitimate to use this, and it’s expected. Why shouldn’t someone call on a God for aid? And, given that they’ve never received any, why shouldn’t they begin to do so in vain? Therefore, swearing by the names of a God makes perfect sense, whether magical assistance is expected or not.
Then there are those swears that are overt. “By the crispy butt-hairs of Johassmit!” Does anyone think this character is actually relying on his God’s crispy butt-hairs? Of course not. This is an overt bastardization of a call for aid, and is meant as both a swear and displayed as irreverence. It is tactical. And while the character making this curse may not disbelieve in the given God, they’re showing open contempt, almost as if daring the deity to do something about it.
Then you’ve got expletives, which are typically (in my definition) having to do with either procreation or fecal matter. There are so many of these in existence, that making some up which fit your story won’t surprise anyone except on the first use. Every human society will have them. If the adults didn’t create them, then the children did, (at least in regards to the excrement), and when the children became adults, it’s not as if they forgot them.
Don’t ignore expletives, swears, or curses. It’s easy to avoid them in narrative, but in dialog, use them artfully and appropriately. Consider the audience for your book when employing them, consider the culture of your people, and the characterization of the individuals. If you choose not to use them, then you have the duty to come up with suitable replacements. A Viking that has just watched their family murdered in front of him is unlikely to scream “Rats!” Maybe he’ll remain silent and glare at the executioners in a combination of fear and impotent rage. It really depends on the character. But if he’s the type to swear, and it’s a story I’m writing, then you can expect a blue streak.