There's nothing complicated about it. The cable comes in from the cable gland, the casing is stripped back, the wires terminated with spade or ring lugs and one wire goes to the electrical screw (as opposed to the mounting screws) on each side of the socket. It is the same whether you have switched or unswitched sockets. The plug you use depends on what type of receptacle your locomotive uses.