If the generator doesn't have an alternator then I would say a battery charger would have to be supplied by both power when the engine is not running and when it is, other wise a lead acid battery will run down on its own.
Also for stand by charging I would recommend using a float type charger, this type maintains the battery at float voltage and extends the battery life the longest.
Putting the charger on the panel that the transfer switch serves to me is the best way so that the charger is charging both when the generator is running and when its not, most generators will have an exorcizer, where the generator starts up and runs like once a week, but these short run times might not fully charge the battery back up.
Also a float charger is also called a battery maintainer.