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
 
P

Patrice

I would check :
- is this supported at all ? (GetCultures allows to list all cultures).
- if yes does it work with zu-zu, afaik the culture is both a "language" and
a "country" (countries may have the same language but different countries
may have different format for dates, times etc...)

You could also use Klingon or whatever, IMO it's bad to create blindly from
UserLanguages, you have a minimal amount of checking to do first.

As a side not you may want to explain what you try to do. Do you have really
a version for all these languages ? IMO it's not that good if not as you'll
finally ends with a site that show some content that is in a foreign
language but with "fragments" that are related to my actual language.

I would say "be consistent" first (ie.e if you display english content to
maltese users, display english dates, not maltese ones).

Patrice
 
K

Karunakararao

Hi Patrice,

yeah, you are right, but my requirement is, just need to show the date
format according to the selected Regional settings.

2004/10/12 04:15:51 nm

Regional Settings : Afrikaans

Regards
Venu






Patrice said:
I would check :
- is this supported at all ? (GetCultures allows to list all cultures).
- if yes does it work with zu-zu, afaik the culture is both a "language"
and
a "country" (countries may have the same language but different countries
may have different format for dates, times etc...)

You could also use Klingon or whatever, IMO it's bad to create blindly
from
UserLanguages, you have a minimal amount of checking to do first.

As a side not you may want to explain what you try to do. Do you have
really
a version for all these languages ? IMO it's not that good if not as
you'll
finally ends with a site that show some content that is in a foreign
language but with "fragments" that are related to my actual language.

I would say "be consistent" first (ie.e if you display english content to
maltese users, display english dates, not maltese ones).

Patrice

--

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
 
P

Patrice

You won't find all cultures. According to my test, you won't find Maltese or
Zulu. Try :
Dim c As System.globalization.CultureInfo

For Each c In
System.Globalization.CultureInfo.GetCultures(Globalization.CultureTypes.AllC
ultures)

Response.Write(c.EnglishName & "," & c.Name & "<br>")

Next



IMO you have to test first if the browser setting is parf of the .NET
supported languages. If not, you'll have a decision to make about what you
want to do (default to another language or add your own support ?)....

Good luck.

Patrice

--

Karunakararao said:
Hi Patrice,

yeah, you are right, but my requirement is, just need to show the date
format according to the selected Regional settings.

2004/10/12 04:15:51 nm

Regional Settings : Afrikaans

Regards
Venu






Patrice said:
I would check :
- is this supported at all ? (GetCultures allows to list all cultures).
- if yes does it work with zu-zu, afaik the culture is both a "language"
and
a "country" (countries may have the same language but different countries
may have different format for dates, times etc...)

You could also use Klingon or whatever, IMO it's bad to create blindly
from
UserLanguages, you have a minimal amount of checking to do first.

As a side not you may want to explain what you try to do. Do you have
really
a version for all these languages ? IMO it's not that good if not as
you'll
finally ends with a site that show some content that is in a foreign
language but with "fragments" that are related to my actual language.

I would say "be consistent" first (ie.e if you display english content to
maltese users, display english dates, not maltese ones).

Patrice

--

"Karunakararao" <[email protected]> a écrit dans le message de
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

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top