i have tried the masuda method with a female foreign Pokemon and a male non foreign Pokemon, will it work the other way around?
Yes. You just have to have a foreign and no foreign.
Or more specifically Pokemon from different countries. So if you were from Kenya and had a Korean ditto and American sand slash that should still work.