Some time ago I developed a multilingual website and now they have asked me that the website should load the language depending on the visitor’s IP address. They are going to provide me with an IP address list of different countries.
For example. If an italian visitor loads the website, the website should load http://www.mydomain.com/it
If the IP is not recognised, the website should load http://www.mydomain.com
How can I achieve this?
Thanks in advance.
Regards
I found a solution and it worked perfectly for me.
I found a site which provides a database table with all the necessary ips and locations. The site can be found at:
http://www.ip2nation.com/
You can download both the sql dump and the php code sample from there.