Binaca (human breath spray, available at any grocery/drug store) and/or
A squirt bottle, set in a straight stream (like a bullet)
White vinegar or lemon juice
While your dog is being vocal, squirt him right on the nose with a water bottle set on a straight stream or spray the Binaca directly into his mouth. For hard cases, put 20 to 30% of plain white vinegar or lemon juice into your squirt bottle. You must squirt/spray your dog within 5 to 10 seconds of him barking for it to be effective and for him to learn from the experience. After the fact does no good in curbing barking behavior. Be consistent and use the squirt bottle each time he barks.
Give the command "Quiet" only once while you spray him in the nose a couple of times. OR if you are using Binaca, spray one time into his mouth (just lift a corner of his lip and spray into his mouth... there is no need to pry his mouth open.) DO NOT threaten your dog with the bottle or the Binaca. Once you pull it out, use it or it will become ineffective. Once you have used your tools, put them away in a cupboard or hide it behind you. DO NOT keep them out in front of you as a threat.
Quietly praise your dog in a high, happy voice as the dog is shaking himself off or trying to spit the Binaca out. You may have to repeat steps one through three several times within the course of about five minutes before you achieve any results at first. This is normal. Just be persistent.
Hands off your dog while he is being vocal. Any touching or soothing behavior while your dog is barking will only REINFORCE the barking! Only touch or pet your dog while he is still AND quiet.
Reward the silence! This is the most important part of teaching your dog to be quiet. Each time your dog is quiet when he would normally bark, make sure you praise him vocally, with a pat or scratch and/or with a treat. This is so he learns that you like it a lot when there is silence.