If the pains don't subside then please have it checked out. I was only on metformin for 6 months but that was long enough to cause bleeding gastritis and low iron as a result of the bleeding. The symptoms for me were: pain under the left ribs, plus some central and right hand pain, all above waist level.
If your wife has been on metformin for a while, it's always a good idea to have iron, folate and B12 levels checked as metformin can block absorption.
I've read that there can be huge differences between the effects of various generic metformin brands, even though they're meant to be exactly the same, so maybe going back to the previous brand that didn't give her any problems is a good idea.