You ask a hard question.
First I normally look at the machine and the electrical documentation for the machine and decide what original components to use and which to replace. Then create an I/O map to decide how to connect the new controls. Normally you can use existing limit switches, some other electrical hardware, the power components, and many times the servos and drives.
Then decide what control to use that meets the requirements of the retrofit. As far as software language, it is dependant on the control that you choose to use. It could be done with Ladder, C, C++, C#, VB, VB.net, or some proprietary language that is specific to the control. Or may require some combination of proprietary and common languages, which is normally the case.
I'm not aware of any manuals that give instructions for doing a retrofit, this normally comes from your experience.