you could use a switch to separate the batteries into 12v units for charging and then throw the switch in the other position and they will be connected into 24 volt unit.
You need to know th efloat voltage of the battery packs. That is the charged voltage, not the running voltage. Your car generator (really a rectified, regulated alternator) outputs about 14 volts to charge the 12 volt battery.
I built a bike light using 4 6 volt celss I bought from
All-Battery.com - Rechargeable batteries & Chargers. It's a 12 volt light 2 6's in series making a 12 v unit x 2 off those. I used an old Ryobi 14.4 volt battery pack as my interface between the charger and batteries. I needed the 14.4 because the float voltage of the 6 v cells is 7.2 volts. The manufacturer should have that info for you. If you have an old drill set up with dead batteries, I can send you details on how to do it.
Jack