not on court. If they scream a swear word, they can get a warning for audio absenity. If it happens a 2nd time, they lose a point, 3rd time lose a game, 4th time and DQ
So players try to stay calm best they can on the court. Often times players will try and swear in different languages than the country they are in to try and get away with it. Sometimes it works, sometimes it doesnt.
The official in the match typically has multiple languages they know, so up to the official.