473,804 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Globalization problem

FM
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




Nov 17 '05 #1
4 3596
Florian,

Try providing the region information as well in order to create a specific
culture rather than a neutral culture. e.g.: "ja-JP instead" of just "ja".

HTH,
Nicole
"FM" <_@mail.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
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




Nov 17 '05 #2
Florian,

Try providing the region information as well in order to create a specific
culture rather than a neutral culture. e.g.: "ja-JP instead" of just "ja".

HTH,
Nicole
"FM" <_@mail.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
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




Nov 17 '05 #3
Florian,

Try providing the region information as well in order to create a specific
culture rather than a neutral culture. e.g.: "ja-JP instead" of just "ja".

HTH,
Nicole
"FM" <_@mail.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
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




Nov 17 '05 #4
Florian,

Try providing the region information as well in order to create a specific
culture rather than a neutral culture. e.g.: "ja-JP instead" of just "ja".

HTH,
Nicole
"FM" <_@mail.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
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




Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1435
by: Xavier MT | last post by:
Hi, I have a site that has some text in spanish and it doesn't display well, for example with a ñ it displays some weird boxes, can anyone help me or point me to some help
0
349
by: FM | last post by:
Hi, I use the following code to set the current culture. If Not IsNothing(Session("language")) Then System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo(Session("language").ToString) End If
1
1466
by: Michael | last post by:
Hi, I'm developing an ASP.NET application that uses globalization. The language information is stored in .resx-files. For development I use VS.NET 2003, IIS v5.1, Framework v1.1, Windows XP Pro. During the build the resources are correctly compiled into satellite assemblies and stored in the appropriate subfolders. Using the Asp.net application on my local machine produces the expected output. Also the access through the network...
1
1436
by: francois | last post by:
hi, I have an ASP.NET application with a piece of code that looks like this: (it is a VB.NET snippet) Thread.CurrentThread.CurrentCulture = New CultureInfo(Session.Item("Culture").ToString) Thread.CurrentThread.CurrentUICulture = New CultureInfo(Session.Item("Culture").ToString)
11
7258
by: Cor Ligthert | last post by:
Hello everybody, Jay and Herfried are telling me every time when I use CDate that using the datetime.parseexact is always the best way to do String to datetime conversions. They don't tell why only that I have to listen to them because they know it better. They told also that in a business situation it is better to use datetime.parseexact for changing cultures and not to use the globalization setting. I did not give them this sample,...
2
3142
by: jason | last post by:
DOTNET 2.0 VS 2005. My client is saying August 13,2006.. julian date should equal 225. Here's what I'm doing: <%@ Import Namespace="system.globalization" %> <script language="VB" runat="server">
1
2376
by: =?Utf-8?B?S3Jpc2huYQ==?= | last post by:
Hi, I am krishna in India.I developed Asp.net application the default culture settings is <globalization culture="en-US" uiCulture="en-US"/>.I need change globalization settings for UK.How to modify the web.config file ?.What is coorect culture for UK and India?. Pls help Thanks in Advance Regards T.A.Krishna
2
5122
by: Terry Olsen | last post by:
I'm a bit confused on how to make my app work in all cultures, particularly with parsing the date out of a string. I read dates from different web sites. The formats I've run into include 'yyyy.mm.dd', 'dd/mm/yyyy', 'yyyy-mm-dd', 'dd-mmm-yyyy'. I'm using the following code to parse the date, which has worked for a lot of Regions but not all, such as Germany. Dim CI As System.Globalization.CultureInfo CI =...
5
1833
by: Basildk | last post by:
Hi. I have a strange problem. We have an asp.net application running on several server with different setups. On 2 of our servers we experience that the globalization settings are misbehaving. We have boiled the problem down to this: (exemplified by a very simple page)
0
3049
by: Sparkiee | last post by:
Hi, A lil bit of help required from you guys, I am trying to make a windows service that will also focus on globalization, the problem i am facing is when i am trying to put globalization code in app.config the windows service throws an error its probably because of using the <system.webin app.config that contains the globalization parameters, copied and pasted from one of my asp.net website where i already used the globalization and i...
0
9593
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10595
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10088
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4306
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.