Maybe it's not the better forum for this question but... here i am. Does anybody knows how to find the country and the language to make the web multilanguage? I am doing something with asp.net but it seems not working well: If use request.Userlanguages I get "es" because it's spanish. But when I use currentculture i get "en-US" instead of "es-ES" that is what i should get in Spain. Any suggestion?
you should get the IP and find what country it belongs to and don't ever use a browser. if you search you'll find for ready databases with the country and IP lists
Thanks, but I finally have solved with the request.userlanguages. The browser tells the language and the country that the user wants, so that I think that is better than the IP. The problem is that i was looking for an "es-es" result when it was "es". For other countries gives things like "en-us" or "es-mx". So that the language is the left(xxx,2) and the country is the right(xxx,2). Then no problem whether the format is "xx" or "xx-yy".
Hi, Looks like you have your solution, but if you change your mind, then you can get a free IP to Country lookup database here: http://www.maxmind.com/app/geoip_country
You have to first locate the IP of the user who is connecting to the website . COmpare the Ip with the database stored( which people like ip2location.com can provide you ) .Thus you can comfartable determine the country of orgin of the users and thereafter u can use it the way u want.