As said already, some advice is common sense and has nothing to do with 'the girl from the third world country'
Never buy anything valuable for her name. There are hundreds of stories from Thailand where western guy have bought a house in the name of the local girlfriend (it's difficult to own a land in Thailand if you are a foreigner). After a while the "girlfriend's" real boyfriend comes and throw you out of the house you have paid and you cannot do anything about it. Some girls have several western guys sending money to them every month and the unsuspecting guys of course think that they are the only "boyfriend".
Well, if you buy your girlfriend a house, even in EU or USA, then it is HER house and not your house.
Why should this be different in Thailand?
If you are in a foreign country, first of all try to collect some information about the legal situation, what is possible for a foreigner and what not.
As Thailand is mentioned, which is my second home - I say it again:
A foreigner can only buy a condominium in his own name, and if it is fully paid with foreign currency and registered in foreigner's name in the land title BEFORE marriage with a Thai, it will belong to him for always, even after divorce. - The reason is the Thai property law, which is very strong, it overrides in this case Thai family law regulating divorce, usually with sharing 50/50 of all assets. As a principle, the foreigner cannot own land in Thailand.
It should be noticed that Thai law does not recognize co-habitation and there is no need to marry as a foreign man if you are 50 y/o, get a retirement visa and remain single with a Thai girlfriend, whose address is registered somewhere else, likely in her home province where she was born. Your home will be safe, even if she is living with you over years.
If you are scammed by a Thai girl regarding property - sorry, your fault, I read about some unbelievable scams of 60 to 80 million baht from a few idiot-foreigners who were constructing a home like a palace on rural land - and after kicked out...
Baht 80 million = approx. 2.2 million USD! Totally crazy, so-called 'yellow fever'