Is it possible to replace 1 or 2 spokes or do you have to replace all the spokes and re-spoke the wheel?

If you do not re-spoke the wheel, the replaced spokes will have to be very tightly tensioned if the wheel is to be round and true.
Do not forget when the first spoke breaks, all the other spokes suddenly have a different tension pattern! Also the rim structure goes out of line.

If you only replace 1 or 2 spokes, you can expect these or the spokes next to them to break again. It is best to re-spoke the entire wheel and to replace the hub just in case the hub holes are damaged. It is possible to re-use the hub by mounting the spokes in the opposite direction (i.e. not in the direction of the ovalisation of the hub holes).