Most countries have enacted laws governing foreign investments. Such laws typically provide protections for foreign investors, govern the tax treatment of investments, and set limits on foreign ownership of certain strategic industries.
To find domestic foreign investment legislation in almost every country, use the following database:
In some cases, you will find a direct link to an open access version of the relevant legislation.
WARNING - while the above database is a handy way to identify relevant laws in multiple jurisdictions, always then go to the legislation provided by official government websites to ensure currency.