Every bottle dynamo I have seen produces alternating current, no polarity. But they often are grounded to the fork, thus if the light is also grounded they might not work if wired wrong.
Originally Posted by
Drew Eckhardt
...
Usually the headlamp has a switch which controls both lights, so you connect the dynamo to its input and taillamp to its output.
...
There are LED headlights for bottle dynamos without switches. To turn off the light, you move the generator off of the tire so it physically stops spinning. I bought a couple such lights off of a clearance table, put one on my errand bike.