Say I have a website www.mysite.com and I want it to be a multilingual site. The following is what I want to achieve: -
1. When a user visits my site, I want to get the ISO code of the user's country. Let's say ISO is "FR". Now I want the user to be redirected to www.mysite.fr
If the ISO address cannot be selected, the user will be redirected to www.mysite.com
Now I used the dll from this site http://ipaddressextensions.codeplex.com/ and used their method, which is something like iso3066code (). BUT I can not get the ISO code based on the IP address of the user. What is the best way to get the ISO code anyway?
2. I have a separate master page for different countries. As for France there is France.master, for Germany there is Germany.master, etc. I want, firstly, the user's ISO-code should be selected, then the user should be redirected to the site corresponding to the ISO And you want the corresponding wizard to load.
Here's the scenario: -
A user from France opens my site by typing "www.mysite.com". Now I want to show the user the contents of my site in French, so I want it to be redirected to "www.mysite.fr" and you want France.master to load for all pages. What I am doing is checking the "top level domain name" entered by the user, which is "com" in this case, then I extract the ISO code then if there is an ISO, the user is redirected to "www.mysite.fr"
In the event that ISO cannot be selected, "www.mysite.com" will be open to the user only.
3. How to redirect the user? Response.Redirect ("http://www.mysite.fr") fails and gives errors such as: -
" " Response.Redirect( "http://www.mysite.fr" , false) Response.Redirect( "http://www.mysite.fr" , true). .
4. www.mysite.com www.mysite.fr . , www.mysite.com, - . "www.mysite.fr" , -.
: -
Global.asax: -
ISO, dll ipaddressextensions. Application ( "UserISO" ) Global.asax. (( ?))
, . .
cookie cookie Page_PreInit().
, , "Response.Redirect(" http://www.mysite.fr ", false)". response.redirect !
, ? , !:(
? ? , !
, - . IP-, IIS.
, . -. ?
, . . !