I am Getting Prboblem with Cultures In Windows XP Mechine

K

Karunakararao

Hi All

DateTime populaing based on regional settings In ASP.NET Application

Iam using this Code:
Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture(HttpContext.Current.Request.UserLanguages[0]);

Thread.CurrentThread.CurrentUICulture = new
CultureInfo(HttpContext.Current.Request.UserLanguages[0]);

Some Cultures disply the Format
When i am using Windows XP Mechine It's Giving Error Message Like this.
Culture name "zu" is not supported. Parameter name: name

These are the New Cultures for which the following error Message is thrown.
Culture name "zu" is not supported. Parameter name: name
Zulu - zu

Maltese
Xhosa xh
Welsh - cy-gb
Tswana -tn
Serbian sr-ba
serbian(Latin)- sr
sami,southern(sweaden)
sami,southern(Norway)
sami,Skolt - se-fi
sami,Notherm
Quechua(Peru)-qu-pe
Quechua(Peru)-qu-pe
Northenrn sotho -ns-za
Maori
Maltese - mt
Kyrgyz(cyrillic)
Croatian - hr-ba
Bosnian(Latin)

Thank You
Venu
 
G

Guest

Venu,

Do you have a more complete sample, including the line of code which
actually throws the exception?

Chris.
 
K

Karunakararao

Hi Chris

I am usign ASP.NET Application

This Code only i written this.
Thread.CurrentThread.CurrentCulture
=CultureInfo.CreateSpecificCulture(Request.UserLanguages[0]);

Response.Write(System.DateTime.Today.ToShortDateString());

Response.Write(CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern);

OutPut:

2004/10/12
yyyy/MM/dd

Some Regional optinal settings not supporting this Code

Like [zulu] is not supporting this code

It's giving this type of error : "Culture name zu is not supported.
Parameter name: name "

How can get the Date format without any error when ever i change the
[zulu] format

Thank You

Venu

Chris Ballard said:
Venu,

Do you have a more complete sample, including the line of code which
actually throws the exception?

Chris.

Karunakararao said:
Hi All

DateTime populaing based on regional settings In ASP.NET Application

Iam using this Code:
Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture(HttpContext.Current.Request.UserLanguages[0]);

Thread.CurrentThread.CurrentUICulture = new
CultureInfo(HttpContext.Current.Request.UserLanguages[0]);

Some Cultures disply the Format
When i am using Windows XP Mechine It's Giving Error Message Like this.
Culture name "zu" is not supported. Parameter name: name

These are the New Cultures for which the following error Message is
thrown.
Culture name "zu" is not supported. Parameter name: name
Zulu - zu

Maltese
Xhosa xh
Welsh - cy-gb
Tswana -tn
Serbian sr-ba
serbian(Latin)- sr
sami,southern(sweaden)
sami,southern(Norway)
sami,Skolt - se-fi
sami,Notherm
Quechua(Peru)-qu-pe
Quechua(Peru)-qu-pe
Northenrn sotho -ns-za
Maori
Maltese - mt
Kyrgyz(cyrillic)
Croatian - hr-ba
Bosnian(Latin)

Thank You
Venu
 
K

Karunakararao

Hi Chris

I am usign ASP.NET Application

This Code only i written this.
Thread.CurrentThread.CurrentCulture
=CultureInfo.CreateSpecificCulture(Request.UserLanguages[0]);

Response.Write(System.DateTime.Today.ToShortDateString());

Response.Write(CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern);

OutPut:

2004/10/12
yyyy/MM/dd

Some Regional optinal settings not supporting this Code

Like [zulu] is not supporting this code

It's giving this type of error : "Culture name zu is not supported.
Parameter name: name "

How can get the Date format without any error Please help me

Thank You

Venu

Chris Ballard said:
Venu,

Do you have a more complete sample, including the line of code which
actually throws the exception?

Chris.

Karunakararao said:
Hi All

DateTime populaing based on regional settings In ASP.NET Application

Iam using this Code:
Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture(HttpContext.Current.Request.UserLanguages[0]);

Thread.CurrentThread.CurrentUICulture = new
CultureInfo(HttpContext.Current.Request.UserLanguages[0]);

Some Cultures disply the Format
When i am using Windows XP Mechine It's Giving Error Message Like this.
Culture name "zu" is not supported. Parameter name: name

These are the New Cultures for which the following error Message is
thrown.
Culture name "zu" is not supported. Parameter name: name
Zulu - zu

Maltese
Xhosa xh
Welsh - cy-gb
Tswana -tn
Serbian sr-ba
serbian(Latin)- sr
sami,southern(sweaden)
sami,southern(Norway)
sami,Skolt - se-fi
sami,Notherm
Quechua(Peru)-qu-pe
Quechua(Peru)-qu-pe
Northenrn sotho -ns-za
Maori
Maltese - mt
Kyrgyz(cyrillic)
Croatian - hr-ba
Bosnian(Latin)

Thank You
Venu
 
G

Guest

Hi,

Are you sure the cultures you are looking for are actually available?

I tried the following code to get a list of available cultures and could not
see zulu in the list:

Response.Write("<h3>Cultute Codes</h3><p>");
CultureInfo[] cultList = CultureInfo.GetCultures(CultureTypes.AllCultures);
foreach(CultureInfo cult in cultList)
{
Response.Write(string.Format("<strong>Name: </strong>{0}, ",cult.Name));
Response.Write(string.Format("<strong>EnglishName:
</strong>{0}<br>",cult.EnglishName));
}

I dont know how you get hold of / install additional cultures if this is the
case.

HTH,
Chris.

Karunakararao said:
Hi Chris

I am usign ASP.NET Application

This Code only i written this.
Thread.CurrentThread.CurrentCulture
=CultureInfo.CreateSpecificCulture(Request.UserLanguages[0]);

Response.Write(System.DateTime.Today.ToShortDateString());

Response.Write(CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern);

OutPut:

2004/10/12
yyyy/MM/dd

Some Regional optinal settings not supporting this Code

Like [zulu] is not supporting this code

It's giving this type of error : "Culture name zu is not supported.
Parameter name: name "

How can get the Date format without any error Please help me

Thank You

Venu

Chris Ballard said:
Venu,

Do you have a more complete sample, including the line of code which
actually throws the exception?

Chris.

Karunakararao said:
Hi All

DateTime populaing based on regional settings In ASP.NET Application

Iam using this Code:
Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture(HttpContext.Current.Request.UserLanguages[0]);

Thread.CurrentThread.CurrentUICulture = new
CultureInfo(HttpContext.Current.Request.UserLanguages[0]);

Some Cultures disply the Format
When i am using Windows XP Mechine It's Giving Error Message Like this.
Culture name "zu" is not supported. Parameter name: name

These are the New Cultures for which the following error Message is
thrown.
Culture name "zu" is not supported. Parameter name: name
Zulu - zu

Maltese
Xhosa xh
Welsh - cy-gb
Tswana -tn
Serbian sr-ba
serbian(Latin)- sr
sami,southern(sweaden)
sami,southern(Norway)
sami,Skolt - se-fi
sami,Notherm
Quechua(Peru)-qu-pe
Quechua(Peru)-qu-pe
Northenrn sotho -ns-za
Maori
Maltese - mt
Kyrgyz(cyrillic)
Croatian - hr-ba
Bosnian(Latin)

Thank You
Venu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top