"Portugal is a small country in Europe."
Translation:Le Portugal est un petit pays d'Europe.
Hi wave002, although in general you're right. Google translate has come a long way. Back in school, I learned that the correct way to say in Europe is en Europe. It is absolutely correct to say en Europe and should be accepted. But de is preferred because it strongly communicates possession "l'appartenance", maybe that's why it is the correct translation. In general, en and de can be interchanged in many cases. De surcroît, en surcroît, de plus, en plus ... It's a matter of preference and it seems that De is more popular in this day and age.
Although gramatically correct, "Portugal est un petit pays en Europe" is not idiomatic. Reference: https://french.stackexchange.com/questions/33339/why-is-en-europe-wrong-in-le-portugal-est-un-petit-pays-deurope