ASP.NET - Culture 'en' is a neutral culture. It cannot be used in formatting and

Asked By Daniel on 29-Jan-12 11:53 PM
Hi!I am getting the following error:

Culture 'en' is a neutral culture. It cannot be used in formatting and parsing and therefore cannot be set as the thread's current culture.

can someone help fixing this problem

smr replied to Daniel on 29-Jan-12 11:57 PM
hi

Try changing the 'en' to 'en-US'
Jitendra Faye replied to Daniel on 29-Jan-12 11:57 PM

Try changing the 'en' to 'en-US'

Here is the table for all possible cultures fo rthe System.Globalization class:

http://www.socalmp.com/blog/template_permalink.asp?id=98

Anoop S replied to Daniel on 30-Jan-12 12:02 AM
This is NotSupportedException -The exception that is thrown when an invoked method is not supported, or when there is an attempt to read, seek, or write to a stream that does not support the invoked functionality.

You can use CultureInfo.CreateSpecificCulture() to get a specific culture for a neutral, however there are issues with that approach. See this for more details ->Neutral Cultures and CreateSpecificCulture()
 http://blogs.msdn.com/b/shawnste/archive/2005/03/18/398840.aspx
D Company replied to Daniel on 30-Jan-12 12:04 AM
Hello,

here is a pointer to solve this problem.

the error is because of following reason.

A culture identifier is a standard international numeric abbreviation and has the components necessary to uniquely identify one of the installed cultures.

Cultures are generally grouped into three sets: invariant cultures, neutral cultures, and specific cultures.

A neutral culture is usually specified by the two-letter lowercase language code, such as en, de and fr. A specific culture is specified using en-US, en-GB, de-DE, fr-FRand so on.

When the vSphere Client is forced to display a different language to the operating system, a specific culture option must be used and not a neutral culture.
 
The error in the Symptoms section indicates that the .net Client was launched with the locale option en, which is a neutral culture


and the resolution

Culture can not be neutral. It must be specific like en-US or fr-FR.

Regards
D
Daniel replied to D Company on 30-Jan-12 12:20 AM
Hey D company!I am following the link  the  link that Suchit and I am seeing where to set any language:
this is the link:
http://www.codeproject.com/Articles/192968/Allow-users-to-select-the-user-interface-language