Hi,
I use the following code to set the current culture.
If Not IsNothing(Sessi on("language") ) Then
System.Threadin g.Thread.Curren tThread.Current Culture = New
System.Globaliz ation.CultureIn fo(Session("lan guage").ToStrin g)
End If
If the users's browser (IE) is configured in the languages section to
support Japanese (ja) I get the following error when I go on the page:
Culture "ja" is a neutral culture. It can not be used in formatting and
parsing and therefore cannot be set as the thread's current culture.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.NotSuppo rtedException: Culture "ja" is a neutral
culture. It can not be used in formatting and parsing and therefore cannot
be set as the thread's current culture.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Stack Trace:
[NotSupportedExc eption: Culture "ja" is a neutral culture. It can not be
used in formatting and parsing and therefore cannot be set as the thread's
current culture.]
System.Globaliz ation.CultureIn fo.CheckNeutral (CultureInfo culture) +110
System.Threadin g.Thread.set_Cu rrentCulture(Cu ltureInfo value) +17
ASPNetPortal.De sktopDefault.Pa ge_Init(Object sender, EventArgs e) +208
System.Web.UI.C ontrol.OnInit(E ventArgs e) +67
System.Web.UI.C ontrol.InitRecu rsive(Control namingContainer ) +235
System.Web.UI.P age.ProcessRequ estMain() +171
Any idea why this is hapening and what should I do would be much
appreciated.
Thanks,
Florian Marinoiu
I use the following code to set the current culture.
If Not IsNothing(Sessi on("language") ) Then
System.Threadin g.Thread.Curren tThread.Current Culture = New
System.Globaliz ation.CultureIn fo(Session("lan guage").ToStrin g)
End If
If the users's browser (IE) is configured in the languages section to
support Japanese (ja) I get the following error when I go on the page:
Culture "ja" is a neutral culture. It can not be used in formatting and
parsing and therefore cannot be set as the thread's current culture.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.NotSuppo rtedException: Culture "ja" is a neutral
culture. It can not be used in formatting and parsing and therefore cannot
be set as the thread's current culture.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Stack Trace:
[NotSupportedExc eption: Culture "ja" is a neutral culture. It can not be
used in formatting and parsing and therefore cannot be set as the thread's
current culture.]
System.Globaliz ation.CultureIn fo.CheckNeutral (CultureInfo culture) +110
System.Threadin g.Thread.set_Cu rrentCulture(Cu ltureInfo value) +17
ASPNetPortal.De sktopDefault.Pa ge_Init(Object sender, EventArgs e) +208
System.Web.UI.C ontrol.OnInit(E ventArgs e) +67
System.Web.UI.C ontrol.InitRecu rsive(Control namingContainer ) +235
System.Web.UI.P age.ProcessRequ estMain() +171
Any idea why this is hapening and what should I do would be much
appreciated.
Thanks,
Florian Marinoiu
Comment