Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Sep 05, 2009 02:45 PM by mbanavige
Member
240 Points
200 Posts
Sep 05, 2009 06:59 AM|LINK
hi
i have a multilanguage website how can i find to whitch language installed on customer's computer to change my web application language to it?
whitch language installed on customer's computer
485 Points
110 Posts
Sep 05, 2009 10:09 AM|LINK
Hi, We cannot achieve this task via C#. However, some JavaScript code may give the help. Please have a try on this demo that when the page loads, a message displaying the browser's language will be alerted.
<head runat="server"> <title></title> <script language="javascript" type="text/javascript"> window.onload = function() { alert(navigator.browserLanguage); } </script> </head> <body> <form id="form1" runat="server"> </form> </body> </html>
If this post will help you Please "Mark As Answer"
All-Star
134971 Points
15423 Posts
ASPInsiders
Moderator
MVP
Sep 05, 2009 02:45 PM|LINK
davood hi i have a multilanguage website how can i find to whitch language installed on customer's computer to change my web application language to it?
In your webpage server-side code, you can use Request.UserLanguages
http://msdn.microsoft.com/en-us/library/system.web.httprequest.userlanguages.aspx
davood
Member
240 Points
200 Posts
whitch language installed on customer's computer
Sep 05, 2009 06:59 AM|LINK
hi
i have a multilanguage website how can i find to whitch language installed on customer's computer to change my web application language to it?
whitch language installed on customer's computer
David
hiren_andhar...
Member
485 Points
110 Posts
Re: whitch language installed on customer's computer
Sep 05, 2009 10:09 AM|LINK
Hi, We cannot achieve this task via C#. However, some JavaScript code may give the help. Please have a try on this demo that when the page loads, a message displaying the browser's language will be alerted.
<head runat="server"> <title></title> <script language="javascript" type="text/javascript"> window.onload = function() { alert(navigator.browserLanguage); } </script> </head> <body> <form id="form1" runat="server"> </form> </body> </html>If this post will help you Please "Mark As Answer"
Software Development Company.
mbanavige
All-Star
134971 Points
15423 Posts
ASPInsiders
Moderator
MVP
Re: whitch language installed on customer's computer
Sep 05, 2009 02:45 PM|LINK
In your webpage server-side code, you can use Request.UserLanguages
http://msdn.microsoft.com/en-us/library/system.web.httprequest.userlanguages.aspx