Hi Friends, I want to make script in php when user open my website in his browser then website automatic show his native language of country. I all ready translate some country languages webpages. please give example, tutorial links. Thanks
I'm looking for this solution too. And this is what I found: http://api.hostip.info/country.php More info at: http://www.hostip.info/use.html
I think I show you what you need, and "how to do it" is no need to say more for a PHP programmer. If you know where users from, you will set cookie or session with lang_var. Or the second method, you create a table with visitors(visitor_id, visitor_ip, visitor_time_in, visitor_lang) Do you want to say more about it?
yes i also spend hours working with above solution but no luck i was just looking for country of user however this will be good start as when you detect country of visitor you can redirect it to specific lang here is how it will work first detect country use ip2nation.com now you can easily select language like $usercountryisocode="query that selects country iso code based on IP" include($usercountryisocode.php); your language file names should be country iso code . php like in.php for hindi cn.php for china pk.php for Pakistani visitors/users if you still un successful drop me a pm as i have done it spending more then 5 days. for you i will do it within less then hour don't hesitate to contact thinking i may charge for it NO NO