J
JollyK
Hi everyone...
I am creating a web app that will support english and french languages.
My code is fairly simple and it working fine. In my global.asax file I have
the
following code in the Application_BeginRequest event.
try
{
Thread.CurrentThread.CurrentCulture = new
CultureInfo(Request.UserLanguages[0]);
}
catch(Exception)
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
}
I have a resource file for french and a resource file for english, and if
the browser langauge
is set to french, then french info is displayed, and if the browser
langauage is set to english,
then english is displayed. So far everything is perfectly.
My issue is, suppose the browser is set to Arabic, or Italian, or any other
langauge, I want to
default it to English. How do I do this ?
I am creating a web app that will support english and french languages.
My code is fairly simple and it working fine. In my global.asax file I have
the
following code in the Application_BeginRequest event.
try
{
Thread.CurrentThread.CurrentCulture = new
CultureInfo(Request.UserLanguages[0]);
}
catch(Exception)
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
}
I have a resource file for french and a resource file for english, and if
the browser langauge
is set to french, then french info is displayed, and if the browser
langauage is set to english,
then english is displayed. So far everything is perfectly.
My issue is, suppose the browser is set to Arabic, or Italian, or any other
langauge, I want to
default it to English. How do I do this ?