Let me get this straight: You have been programming Java for years but you haven't saved any money. Being in a situation without any savings, you take the adventure and go to Portugal to sign a contract that you don't understand. The company you work for figures out you are not the person they are looking for, and fires you during your trial period (in which both parties can end the contract within a week, therefore it's called a trial period).
I don't know you, so I can't really judge, but can you answer this question: Before blaming other people, have you looked into the mirror first and questioned how you ended up in this situation?