Lia Fail wrote:
I can't help other than tell you that I studied in one country - Ireland - but carried on part-time freelancing - from another country - Spain. Both were EU countries. I wasn't entirely sure of the legalities, but I figured I wasn't going to be living enough days in one year in Ireland to be considered resident there. So I studied in Ireland and did my occasional jobs in Ireland but billed with my Spanish address and was paid into my Spanish account.
It seems to me that you might be able to do something similar: to all intents and purposes work as a freelancer based in Algeria, although physically (and temporarily) present in another country. Yet, if you have a student visa to study in Spain, that implies being awarded residence for that period. And strictly speaking, you can't be resident in two countries at one. I didn't need a visa, so that issue didn't come up.
You need to make enquiries with the authorities in both countries, but you may find it's a legal loophole. Nowadays, with the Internet, many people are physically located in one place while fiscally located else. It's probably not entirely legal, but it's difficult to see how to control it. And if it's only temporary (as in my case and your case) and provided you pay your taxes, it may be that, if not entirely legal, it's tolerated.
Please don't take this as gospel, as I'm only telling you what I did, not what should be done:-)
[Edited at 2009-01-18 16:21 GMT]