You can use a bridge-rectifier with a filter capacitor(electrolytic) after the dimmer to produce a, more or less, constant DC voltage that can used to charge your batter but the whole solution is ad-hoc and you better do some extensive testing at low voltages before you move to line voltage.
So it is like
AC Line->Transformer(for testing at low voltages)->Dimmer->Bridget-Rectifier->Filter/Storage Capacitor(Electrolytic)->Fuse->Battery to be charged.
Also be very careful when testing at line voltages, some shocks can be pretty nasty and leave you numb for several minutes.