The required resistor value would be (Vs-Vd-Vb)/Ic, where Vs is the supply voltage across C1, Vd is the series diode voltage (typically 0.65V), Vb is the battery voltage during charge, and Ic is the desired charge current.
If Vs is close to Vb then it may be difficult to get a reliable controlled charge current. You may need to increase Vs and add a regulator, to provide the 12V output.
Switching supplies operating from 230VAC are not trivial to design so, unless you need high efficiency or small size, I would stay with a regular transformer.