Unlike this question, I'm assuming here that a pump bottle's nozzle can't be locked. Then how can i stop the nozzle from being accidentally triggered, e.g. if I have it packed in luggage?
The simplest way would be to remove the pump mechanism altogether and find a screw-cap with the same thread to close up the bottle. Pump the mechanism dry, then pack it separately.
You could try jamming the nozzle open (with cardboard and tape) or closed (pump the nozzle all the way down and put the bottle into a box that is just the right height to not allow the nozzle to return to its usual position), but if anything gives way, be prepared for a mess.
Alternatively, just carry a refill-pack together with an empty pump bottle. Fill the bottle when you arrive.