At least once every trip, we seem end up stuck in a line ahead of someone who swears like a sailor -- half the time it's somebody having an argument on their phone, and the other half of the time it's just somebody who clearly talks like that normally and thinks nothing of casually dropping f-bombs and such in front of toddlers. We just roll our eyes, exchange a knowing look with our kids that this kind of language is not okay, and try to strike up our own conversation as a distraction.
When the kids were little, a few times I was brave enough to say to the person, in an upbeat and friendly way, "Excuse me, I'm so sorry to bother you, but your voice really carries, and I'm afraid my 2-year-old is at the stage where he repeats everything he hears! Would you mind keeping your voice down, so he doesn't pick up a few new words that will get him trouble at daycare? I'd really appreciate it!" To their credit, the people I asked always responded nicely to that approach, giving some credence to the adage about catching more flies with honey than with vinegar. Of course, it was always possible that they'd take offense, double down on their language, and start hurling it at me instead, but thankfully, that didn't happen.