For the original StarCraft, I'm fairly certain it isn't possible to disable swearing. As for StarCraft II, I'm not entirely sure—it may vary depending on settings and updates.