I really do not understand why it is so important to people that their dogs "play nice" with other dogs that are not their pack members.
This is not normal behavior for a canid. In the wild, dogs and wolves are social pack animals. Strangers are viewed as a threat, and are treated as such.
I do insist on civil behavior, but I don't expect my dogs to interact socially with those they do not know.
One should keep in mind that when a dog is already showing inappropriate aggressive behavior to others, inflicting PAIN on that dog as a "correction" amy cause the dog to associate this discomfort with the appearance of approach of another dog, COMPOUNDING your problem, not solving it.
I prefer to teach the dog to pay attention to ME with positive methods. I do this in a distraction free comfortable area at first, such as inside your home. ONce the dog learns to look when you say the name, then I introduce distractions. The dog is rewarded when he looks at me instead of the distraction.
Once focussed attention is properly trained, you can then ask the dog to pay attention to YOU instead of the distraction, the other dog.
It is very important that the dog views you as his absolute trusted and DOMINANT pack leader for any of these methods to work.
I have talked in several different posts here about how to train your dog to pay attention to you, but if someone wants a review, I will post it in a different post with that topic so it can be looked up later.