Thanks for your question. I will try to help.
If she is in the UK on a visit visa then her application to switch to a settlement/spouse visa would be rejected if she made it within the UK, this is because all visitors are under the visa condition that they must return to their home country before the expiry of their visit visa.
This is enforced very strictly and is taken to include any attempt to switch to another visa category.
Her application would almost certainly be rejected and the (expensive) application fee would be retained.
Probably the only times that they would exercise discretion and allow the application would be where your wife was seriously ill and travel would worsen her condition and would need a doctor’s note.
It might also be possible (though certainly not guaranteed) to apply if f the country itself had descended in to open civil war and it demonstrable that your wife would face a real and serious threat to her life if she were returned. They would probably expect to see that travel to the country had been advised against by the home office.
IN the circumstances, I would not be optimistic that he in county application would be allowed.
My goal is to provide you with a good service. If you feel you have received anything less, please reply back. Please remember to leave positive feedback using the stars at the top of the page.