One problem here is that transformers won't work on ordinary DC, meaning a DC voltage applied to the primary winding. (We're discounting a pulsating DC for sake of simplicity).
Your question needs to be clarified a bit. If you mean a transformer/rectifier unit that has an AC voltage applied at the primary (input) and outputs 24V DC, then in theory reversing the AC input leads should make no difference in the output voltage.
One qualifier here - in practicle applications, the AC side (Primary) may be made with one lead intended to be the "hot" on a 120V system and the other lead intended to be the "neutral". This has no affect the actual circuit operation - but will affect safety, etc.