I had a couple of transformers go on halogen spotlights. I'm the in the process of switching to LEDs so I bought LED transformers instead.
The old transformers had a blue and brown wire on the input AC side which were connected directly to the same colour mains wires in the connection box...