473,503 Members | 2,135 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET 2.0 Beta and Localization

I encounter a problem with Localization features in ASP.NET 2.0.
Is seems that the framework is not able to manage neutral cultures such as
'fr', or 'de'. Those are the culture sent by default from a french or German
Internet Explorer in France or Germany.

There is a runtime error "System.NotSupportedException: Culture "fr" is a
neutral culture. It can not be used in formatting and parsing and therefore
cannot be set as the thread's current culture."

However, this happens only the first time a page in the site is accessed.
Other hits are processed correctly...

TIA.
Nov 19 '05 #1
8 2528
Try using "fr-FR" and "de-DE", if you're configuring culture and uiCulture.

If you're using resources, remember that they now go
in the App_LocalResources directory.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"Olivier Matrot" <ol****************@online.nospam> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I encounter a problem with Localization features in ASP.NET 2.0.
Is seems that the framework is not able to manage neutral cultures such as 'fr', or
'de'. Those are the culture sent by default from a french or German Internet Explorer in
France or Germany.

There is a runtime error "System.NotSupportedException: Culture "fr" is a neutral
culture. It can not be used in formatting and parsing and therefore cannot be set as the
thread's current culture."

However, this happens only the first time a page in the site is accessed. Other hits are
processed correctly...

TIA.

Nov 19 '05 #2
In ASP.NET 2.0 the thread culture is automatically set to the culture
request found in the headers sent by Internet Explorer.
I'm pretty sure that this will be corrected in the final release, but in the
meantime, I must found a solution to this particular problem.

Anyway, Internet Explorer has no way to specify 'fr-FR' in the language
preferences, and I do not want my customers to make such a change because of
a restriction in the current Framework release. Firefox have the language
'fr-FR' available.

Here is the call stack :
System.Globalization.CultureInfo.CheckNeutral(Cult ureInfo culture) +2722547
System.Threading.Thread.set_CurrentCulture(Culture Info value) +42
System.Web.HttpApplication.SetCulture(Boolean useAppCulture) +3438992
System.Web.HttpApplication.ProcessSpecialRequest(H ttpContext context,
MethodInfo method, Int32 paramCount, Object eventSource, EventArgs
eventArgs, HttpSessionState session) +187

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:O4**************@TK2MSFTNGP12.phx.gbl...
Try using "fr-FR" and "de-DE", if you're configuring culture and
uiCulture.

If you're using resources, remember that they now go
in the App_LocalResources directory.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"Olivier Matrot" <ol****************@online.nospam> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I encounter a problem with Localization features in ASP.NET 2.0.
Is seems that the framework is not able to manage neutral cultures such
as 'fr', or 'de'. Those are the culture sent by default from a french or
German Internet Explorer in France or Germany.

There is a runtime error "System.NotSupportedException: Culture "fr" is a
neutral culture. It can not be used in formatting and parsing and
therefore cannot be set as the thread's current culture."

However, this happens only the first time a page in the site is accessed.
Other hits are processed correctly...

TIA.


Nov 19 '05 #3
That is not a "problem" nor a "restriction"
and there's nothing to fix. It's a feature.

You have a number of misconceptions which
would be too extensive to deal with in a short post.

Please review this :
http://beta.asp.net/QUICKSTART/aspne...spx#ielanguage

In ASP.NET 2.0, setting your Page culture to :

<%@ Page Culture="auto:fr-FR" %>

should fix your problem.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"Olivier Matrot" <ol****************@online.nospam> wrote in message
news:OM****************@TK2MSFTNGP12.phx.gbl...
In ASP.NET 2.0 the thread culture is automatically set to the culture request found in
the headers sent by Internet Explorer.
I'm pretty sure that this will be corrected in the final release, but in the meantime, I
must found a solution to this particular problem.

Anyway, Internet Explorer has no way to specify 'fr-FR' in the language preferences, and
I do not want my customers to make such a change because of a restriction in the current
Framework release. Firefox have the language 'fr-FR' available.

Here is the call stack :
System.Globalization.CultureInfo.CheckNeutral(Cult ureInfo culture) +2722547
System.Threading.Thread.set_CurrentCulture(Culture Info value) +42
System.Web.HttpApplication.SetCulture(Boolean useAppCulture) +3438992
System.Web.HttpApplication.ProcessSpecialRequest(H ttpContext context, MethodInfo
method, Int32 paramCount, Object eventSource, EventArgs eventArgs, HttpSessionState
session) +187

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:O4**************@TK2MSFTNGP12.phx.gbl...
Try using "fr-FR" and "de-DE", if you're configuring culture and uiCulture.

If you're using resources, remember that they now go
in the App_LocalResources directory.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"Olivier Matrot" <ol****************@online.nospam> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I encounter a problem with Localization features in ASP.NET 2.0.
Is seems that the framework is not able to manage neutral cultures such as 'fr', or
'de'. Those are the culture sent by default from a french or German Internet Explorer
in France or Germany.

There is a runtime error "System.NotSupportedException: Culture "fr" is a neutral
culture. It can not be used in formatting and parsing and therefore cannot be set as
the thread's current culture."

However, this happens only the first time a page in the site is accessed. Other hits
are processed correctly...

TIA.



Nov 19 '05 #4
I've modified all my pages as you suggested.
The problem is not fixed.

I forgot to say that the exception is thrown before any of the function
available in Global.asax.cs are reached.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2******************@TK2MSFTNGP15.phx.gbl...
That is not a "problem" nor a "restriction"
and there's nothing to fix. It's a feature.

You have a number of misconceptions which
would be too extensive to deal with in a short post.

Please review this :
http://beta.asp.net/QUICKSTART/aspne...spx#ielanguage

In ASP.NET 2.0, setting your Page culture to :

<%@ Page Culture="auto:fr-FR" %>

should fix your problem.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"Olivier Matrot" <ol****************@online.nospam> wrote in message
news:OM****************@TK2MSFTNGP12.phx.gbl...
In ASP.NET 2.0 the thread culture is automatically set to the culture
request found in the headers sent by Internet Explorer.
I'm pretty sure that this will be corrected in the final release, but in
the meantime, I must found a solution to this particular problem.

Anyway, Internet Explorer has no way to specify 'fr-FR' in the language
preferences, and I do not want my customers to make such a change because
of a restriction in the current Framework release. Firefox have the
language 'fr-FR' available.

Here is the call stack :
System.Globalization.CultureInfo.CheckNeutral(Cult ureInfo culture)
+2722547
System.Threading.Thread.set_CurrentCulture(Culture Info value) +42
System.Web.HttpApplication.SetCulture(Boolean useAppCulture) +3438992
System.Web.HttpApplication.ProcessSpecialRequest(H ttpContext context,
MethodInfo method, Int32 paramCount, Object eventSource, EventArgs
eventArgs, HttpSessionState session) +187

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:O4**************@TK2MSFTNGP12.phx.gbl...
Try using "fr-FR" and "de-DE", if you're configuring culture and
uiCulture.

If you're using resources, remember that they now go
in the App_LocalResources directory.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"Olivier Matrot" <ol****************@online.nospam> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I encounter a problem with Localization features in ASP.NET 2.0.
Is seems that the framework is not able to manage neutral cultures such
as 'fr', or 'de'. Those are the culture sent by default from a french
or German Internet Explorer in France or Germany.

There is a runtime error "System.NotSupportedException: Culture "fr" is
a neutral culture. It can not be used in formatting and parsing and
therefore cannot be set as the thread's current culture."

However, this happens only the first time a page in the site is
accessed. Other hits are processed correctly...

TIA.



Nov 19 '05 #5
Very strange, indeed.

Have you considered bugging the behavior at
http://lab.msdn.microsoft.com/productfeedback/ ?

You'll need a Passport account to file a bug there.

Thanks !


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"Olivier Matrot" <ol****************@online.nospam> wrote in message
news:eR**************@TK2MSFTNGP10.phx.gbl...
I've modified all my pages as you suggested.
The problem is not fixed.

I forgot to say that the exception is thrown before any of the function available in
Global.asax.cs are reached.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2******************@TK2MSFTNGP15.phx.gbl...
That is not a "problem" nor a "restriction"
and there's nothing to fix. It's a feature.

You have a number of misconceptions which
would be too extensive to deal with in a short post.

Please review this :
http://beta.asp.net/QUICKSTART/aspne...spx#ielanguage

In ASP.NET 2.0, setting your Page culture to :

<%@ Page Culture="auto:fr-FR" %>

should fix your problem.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"Olivier Matrot" <ol****************@online.nospam> wrote in message
news:OM****************@TK2MSFTNGP12.phx.gbl...
In ASP.NET 2.0 the thread culture is automatically set to the culture request found in
the headers sent by Internet Explorer.
I'm pretty sure that this will be corrected in the final release, but in the meantime,
I must found a solution to this particular problem.

Anyway, Internet Explorer has no way to specify 'fr-FR' in the language preferences,
and I do not want my customers to make such a change because of a restriction in the
current Framework release. Firefox have the language 'fr-FR' available.

Here is the call stack :
System.Globalization.CultureInfo.CheckNeutral(Cult ureInfo culture) +2722547
System.Threading.Thread.set_CurrentCulture(Culture Info value) +42
System.Web.HttpApplication.SetCulture(Boolean useAppCulture) +3438992
System.Web.HttpApplication.ProcessSpecialRequest(H ttpContext context, MethodInfo
method, Int32 paramCount, Object eventSource, EventArgs eventArgs, HttpSessionState
session) +187

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:O4**************@TK2MSFTNGP12.phx.gbl...
Try using "fr-FR" and "de-DE", if you're configuring culture and uiCulture.

If you're using resources, remember that they now go
in the App_LocalResources directory.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"Olivier Matrot" <ol****************@online.nospam> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
>I encounter a problem with Localization features in ASP.NET 2.0.
> Is seems that the framework is not able to manage neutral cultures such as 'fr', or
> 'de'. Those are the culture sent by default from a french or German Internet
> Explorer in France or Germany.
>
> There is a runtime error "System.NotSupportedException: Culture "fr" is a neutral
> culture. It can not be used in formatting and parsing and therefore cannot be set as
> the thread's current culture."
>
> However, this happens only the first time a page in the site is accessed. Other hits
> are processed correctly...
>
> TIA.



Nov 19 '05 #6
Hi Olivier,

I've just performed the test on my local ASP.NET 2.0 beta2 environment,
seems I'm not able to repro the behavior when using a english version's
IE(set the default browser language to fr ). As you also mentioned that
the exception happens at the intial request to the website and before event
in Global.asax get fired, I'm wondering that it's a parsing error occur
during the dynamica compilation stage. Have you checked your global
resource or any other global component (which will be compiled at initial
time) to see whether you've set any neutral culture as the "Culture"
attribute? Anyway, what make me strange is that the runtime should always
convert neutral culture to specific culture internally. So if you did be
able to repro the problem on the latest beta2 or CTP, I suggest you try
submitting a fix request as Juan has mentioned.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



--------------------
| From: "Juan T. Llibre" <no***********@nowhere.com>
| References: <#1**************@TK2MSFTNGP12.phx.gbl>
<O4**************@TK2MSFTNGP12.phx.gbl>
<OM**************@TK2MSFTNGP12.phx.gbl>
<#y**************@TK2MSFTNGP15.phx.gbl>
<eR**************@TK2MSFTNGP10.phx.gbl>
| Subject: Re: ASP.NET 2.0 Beta and Localization
| Date: Tue, 16 Aug 2005 12:15:50 -0400
| Lines: 117
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
| X-RFC2646: Format=Flowed; Response
| Message-ID: <Ok**************@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 222stb33.codetel.net.do 64.32.114.222
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:118329
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Very strange, indeed.
|
| Have you considered bugging the behavior at
| http://lab.msdn.microsoft.com/productfeedback/ ?
|
| You'll need a Passport account to file a bug there.
|
| Thanks !
|
|
|
|
| Juan T. Llibre
| ASP.NET MVP
| http://asp.net.do/foros/
| Foros de ASP.NET en Espaņol
| Ven, y hablemos de ASP.NET...
| ======================
|
| "Olivier Matrot" <ol****************@online.nospam> wrote in message
| news:eR**************@TK2MSFTNGP10.phx.gbl...
| > I've modified all my pages as you suggested.
| > The problem is not fixed.
| >
| > I forgot to say that the exception is thrown before any of the function
available in
| > Global.asax.cs are reached.
| >
| > "Juan T. Llibre" <no***********@nowhere.com> wrote in message
| > news:%2******************@TK2MSFTNGP15.phx.gbl...
| >> That is not a "problem" nor a "restriction"
| >> and there's nothing to fix. It's a feature.
| >>
| >> You have a number of misconceptions which
| >> would be too extensive to deal with in a short post.
| >>
| >> Please review this :
| >>
http://beta.asp.net/QUICKSTART/aspne....aspx#ielangua
ge
| >>
| >> In ASP.NET 2.0, setting your Page culture to :
| >>
| >> <%@ Page Culture="auto:fr-FR" %>
| >>
| >> should fix your problem.
| >>
| >>
| >>
| >> Juan T. Llibre
| >> ASP.NET MVP
| >> http://asp.net.do/foros/
| >> Foros de ASP.NET en Espaņol
| >> Ven, y hablemos de ASP.NET...
| >> ======================
| >>
| >> "Olivier Matrot" <ol****************@online.nospam> wrote in message
| >> news:OM****************@TK2MSFTNGP12.phx.gbl...
| >>> In ASP.NET 2.0 the thread culture is automatically set to the culture
request found in
| >>> the headers sent by Internet Explorer.
| >>> I'm pretty sure that this will be corrected in the final release, but
in the meantime,
| >>> I must found a solution to this particular problem.
| >>>
| >>> Anyway, Internet Explorer has no way to specify 'fr-FR' in the
language preferences,
| >>> and I do not want my customers to make such a change because of a
restriction in the
| >>> current Framework release. Firefox have the language 'fr-FR'
available.
| >>>
| >>> Here is the call stack :
| >>> System.Globalization.CultureInfo.CheckNeutral(Cult ureInfo culture)
+2722547
| >>> System.Threading.Thread.set_CurrentCulture(Culture Info value) +42
| >>> System.Web.HttpApplication.SetCulture(Boolean useAppCulture)
+3438992
| >>> System.Web.HttpApplication.ProcessSpecialRequest(H ttpContext
context, MethodInfo
| >>> method, Int32 paramCount, Object eventSource, EventArgs eventArgs,
HttpSessionState
| >>> session) +187
| >>>
| >>>
| >>>
| >>>
| >>>
| >>> "Juan T. Llibre" <no***********@nowhere.com> wrote in message
| >>> news:O4**************@TK2MSFTNGP12.phx.gbl...
| >>>> Try using "fr-FR" and "de-DE", if you're configuring culture and
uiCulture.
| >>>>
| >>>> If you're using resources, remember that they now go
| >>>> in the App_LocalResources directory.
| >>>>
| >>>>
| >>>>
| >>>> Juan T. Llibre
| >>>> ASP.NET MVP
| >>>> http://asp.net.do/foros/
| >>>> Foros de ASP.NET en Espaņol
| >>>> Ven, y hablemos de ASP.NET...
| >>>> ======================
| >>>>
| >>>> "Olivier Matrot" <ol****************@online.nospam> wrote in message
| >>>> news:%2****************@TK2MSFTNGP12.phx.gbl...
| >>>>>I encounter a problem with Localization features in ASP.NET 2.0.
| >>>>> Is seems that the framework is not able to manage neutral cultures
such as 'fr', or
| >>>>> 'de'. Those are the culture sent by default from a french or German
Internet
| >>>>> Explorer in France or Germany.
| >>>>>
| >>>>> There is a runtime error "System.NotSupportedException: Culture
"fr" is a neutral
| >>>>> culture. It can not be used in formatting and parsing and therefore
cannot be set as
| >>>>> the thread's current culture."
| >>>>>
| >>>>> However, this happens only the first time a page in the site is
accessed. Other hits
| >>>>> are processed correctly...
| >>>>>
| >>>>> TIA.
| >>>>
| >>>>
| >>>
| >>>
| >>
| >>
| >
| >
|
|
|

Nov 19 '05 #7
Found the problem.
The Globalization section in web.config has culture and uiCulture set to
"auto". Switching to "fr-FR" solved the problem.
"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:8g*************@TK2MSFTNGXA01.phx.gbl...
Hi Olivier,

I've just performed the test on my local ASP.NET 2.0 beta2 environment,
seems I'm not able to repro the behavior when using a english version's
IE(set the default browser language to fr ). As you also mentioned that
the exception happens at the intial request to the website and before
event
in Global.asax get fired, I'm wondering that it's a parsing error occur
during the dynamica compilation stage. Have you checked your global
resource or any other global component (which will be compiled at initial
time) to see whether you've set any neutral culture as the "Culture"
attribute? Anyway, what make me strange is that the runtime should
always
convert neutral culture to specific culture internally. So if you did be
able to repro the problem on the latest beta2 or CTP, I suggest you try
submitting a fix request as Juan has mentioned.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



--------------------
| From: "Juan T. Llibre" <no***********@nowhere.com>
| References: <#1**************@TK2MSFTNGP12.phx.gbl>
<O4**************@TK2MSFTNGP12.phx.gbl>
<OM**************@TK2MSFTNGP12.phx.gbl>
<#y**************@TK2MSFTNGP15.phx.gbl>
<eR**************@TK2MSFTNGP10.phx.gbl>
| Subject: Re: ASP.NET 2.0 Beta and Localization
| Date: Tue, 16 Aug 2005 12:15:50 -0400
| Lines: 117
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
| X-RFC2646: Format=Flowed; Response
| Message-ID: <Ok**************@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 222stb33.codetel.net.do 64.32.114.222
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:118329
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Very strange, indeed.
|
| Have you considered bugging the behavior at
| http://lab.msdn.microsoft.com/productfeedback/ ?
|
| You'll need a Passport account to file a bug there.
|
| Thanks !
|
|
|
|
| Juan T. Llibre
| ASP.NET MVP
| http://asp.net.do/foros/
| Foros de ASP.NET en Espaņol
| Ven, y hablemos de ASP.NET...
| ======================
|
| "Olivier Matrot" <ol****************@online.nospam> wrote in message
| news:eR**************@TK2MSFTNGP10.phx.gbl...
| > I've modified all my pages as you suggested.
| > The problem is not fixed.
| >
| > I forgot to say that the exception is thrown before any of the
function
available in
| > Global.asax.cs are reached.
| >
| > "Juan T. Llibre" <no***********@nowhere.com> wrote in message
| > news:%2******************@TK2MSFTNGP15.phx.gbl...
| >> That is not a "problem" nor a "restriction"
| >> and there's nothing to fix. It's a feature.
| >>
| >> You have a number of misconceptions which
| >> would be too extensive to deal with in a short post.
| >>
| >> Please review this :
| >>
http://beta.asp.net/QUICKSTART/aspne....aspx#ielangua
ge
| >>
| >> In ASP.NET 2.0, setting your Page culture to :
| >>
| >> <%@ Page Culture="auto:fr-FR" %>
| >>
| >> should fix your problem.
| >>
| >>
| >>
| >> Juan T. Llibre
| >> ASP.NET MVP
| >> http://asp.net.do/foros/
| >> Foros de ASP.NET en Espaņol
| >> Ven, y hablemos de ASP.NET...
| >> ======================
| >>
| >> "Olivier Matrot" <ol****************@online.nospam> wrote in message
| >> news:OM****************@TK2MSFTNGP12.phx.gbl...
| >>> In ASP.NET 2.0 the thread culture is automatically set to the
culture
request found in
| >>> the headers sent by Internet Explorer.
| >>> I'm pretty sure that this will be corrected in the final release,
but
in the meantime,
| >>> I must found a solution to this particular problem.
| >>>
| >>> Anyway, Internet Explorer has no way to specify 'fr-FR' in the
language preferences,
| >>> and I do not want my customers to make such a change because of a
restriction in the
| >>> current Framework release. Firefox have the language 'fr-FR'
available.
| >>>
| >>> Here is the call stack :
| >>> System.Globalization.CultureInfo.CheckNeutral(Cult ureInfo culture)
+2722547
| >>> System.Threading.Thread.set_CurrentCulture(Culture Info value) +42
| >>> System.Web.HttpApplication.SetCulture(Boolean useAppCulture)
+3438992
| >>> System.Web.HttpApplication.ProcessSpecialRequest(H ttpContext
context, MethodInfo
| >>> method, Int32 paramCount, Object eventSource, EventArgs eventArgs,
HttpSessionState
| >>> session) +187
| >>>
| >>>
| >>>
| >>>
| >>>
| >>> "Juan T. Llibre" <no***********@nowhere.com> wrote in message
| >>> news:O4**************@TK2MSFTNGP12.phx.gbl...
| >>>> Try using "fr-FR" and "de-DE", if you're configuring culture and
uiCulture.
| >>>>
| >>>> If you're using resources, remember that they now go
| >>>> in the App_LocalResources directory.
| >>>>
| >>>>
| >>>>
| >>>> Juan T. Llibre
| >>>> ASP.NET MVP
| >>>> http://asp.net.do/foros/
| >>>> Foros de ASP.NET en Espaņol
| >>>> Ven, y hablemos de ASP.NET...
| >>>> ======================
| >>>>
| >>>> "Olivier Matrot" <ol****************@online.nospam> wrote in
message
| >>>> news:%2****************@TK2MSFTNGP12.phx.gbl...
| >>>>>I encounter a problem with Localization features in ASP.NET 2.0.
| >>>>> Is seems that the framework is not able to manage neutral cultures
such as 'fr', or
| >>>>> 'de'. Those are the culture sent by default from a french or
German
Internet
| >>>>> Explorer in France or Germany.
| >>>>>
| >>>>> There is a runtime error "System.NotSupportedException: Culture
"fr" is a neutral
| >>>>> culture. It can not be used in formatting and parsing and
therefore
cannot be set as
| >>>>> the thread's current culture."
| >>>>>
| >>>>> However, this happens only the first time a page in the site is
accessed. Other hits
| >>>>> are processed correctly...
| >>>>>
| >>>>> TIA.
| >>>>
| >>>>
| >>>
| >>>
| >>
| >>
| >
| >
|
|
|

Nov 19 '05 #8
Glad that you've found the cause Olivier,

If there're any further things or questions we can help, please always feel
free to post here.

Thanks & Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Olivier Matrot" <ol****************@online.nospam>
| References: <#1**************@TK2MSFTNGP12.phx.gbl>
<O4**************@TK2MSFTNGP12.phx.gbl>
<OM**************@TK2MSFTNGP12.phx.gbl>
<#y**************@TK2MSFTNGP15.phx.gbl>
<eR**************@TK2MSFTNGP10.phx.gbl>
<Ok**************@TK2MSFTNGP09.phx.gbl>
<8g*************@TK2MSFTNGXA01.phx.gbl>
| Subject: Re: ASP.NET 2.0 Beta and Localization
| Date: Wed, 17 Aug 2005 09:50:43 +0200
| Lines: 207
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <#s**************@tk2msftngp13.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: reverse.completel.net 213.30.138.178
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msft ngp13.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:118508
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Found the problem.
| The Globalization section in web.config has culture and uiCulture set to
| "auto". Switching to "fr-FR" solved the problem.
|
|
| "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
| news:8g*************@TK2MSFTNGXA01.phx.gbl...
| > Hi Olivier,
| >
| > I've just performed the test on my local ASP.NET 2.0 beta2 environment,
| > seems I'm not able to repro the behavior when using a english version's
| > IE(set the default browser language to fr ). As you also mentioned that
| > the exception happens at the intial request to the website and before
| > event
| > in Global.asax get fired, I'm wondering that it's a parsing error occur
| > during the dynamica compilation stage. Have you checked your global
| > resource or any other global component (which will be compiled at
initial
| > time) to see whether you've set any neutral culture as the "Culture"
| > attribute? Anyway, what make me strange is that the runtime should
| > always
| > convert neutral culture to specific culture internally. So if you did be
| > able to repro the problem on the latest beta2 or CTP, I suggest you try
| > submitting a fix request as Juan has mentioned.
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| >
| >
| >
| >
| > --------------------
| > | From: "Juan T. Llibre" <no***********@nowhere.com>
| > | References: <#1**************@TK2MSFTNGP12.phx.gbl>
| > <O4**************@TK2MSFTNGP12.phx.gbl>
| > <OM**************@TK2MSFTNGP12.phx.gbl>
| > <#y**************@TK2MSFTNGP15.phx.gbl>
| > <eR**************@TK2MSFTNGP10.phx.gbl>
| > | Subject: Re: ASP.NET 2.0 Beta and Localization
| > | Date: Tue, 16 Aug 2005 12:15:50 -0400
| > | Lines: 117
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
| > | X-RFC2646: Format=Flowed; Response
| > | Message-ID: <Ok**************@TK2MSFTNGP09.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: 222stb33.codetel.net.do 64.32.114.222
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:118329
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | Very strange, indeed.
| > |
| > | Have you considered bugging the behavior at
| > | http://lab.msdn.microsoft.com/productfeedback/ ?
| > |
| > | You'll need a Passport account to file a bug there.
| > |
| > | Thanks !
| > |
| > |
| > |
| > |
| > | Juan T. Llibre
| > | ASP.NET MVP
| > | http://asp.net.do/foros/
| > | Foros de ASP.NET en Espaņol
| > | Ven, y hablemos de ASP.NET...
| > | ======================
| > |
| > | "Olivier Matrot" <ol****************@online.nospam> wrote in message
| > | news:eR**************@TK2MSFTNGP10.phx.gbl...
| > | > I've modified all my pages as you suggested.
| > | > The problem is not fixed.
| > | >
| > | > I forgot to say that the exception is thrown before any of the
| > function
| > available in
| > | > Global.asax.cs are reached.
| > | >
| > | > "Juan T. Llibre" <no***********@nowhere.com> wrote in message
| > | > news:%2******************@TK2MSFTNGP15.phx.gbl...
| > | >> That is not a "problem" nor a "restriction"
| > | >> and there's nothing to fix. It's a feature.
| > | >>
| > | >> You have a number of misconceptions which
| > | >> would be too extensive to deal with in a short post.
| > | >>
| > | >> Please review this :
| > | >>
| >
http://beta.asp.net/QUICKSTART/aspne....aspx#ielangua
| > ge
| > | >>
| > | >> In ASP.NET 2.0, setting your Page culture to :
| > | >>
| > | >> <%@ Page Culture="auto:fr-FR" %>
| > | >>
| > | >> should fix your problem.
| > | >>
| > | >>
| > | >>
| > | >> Juan T. Llibre
| > | >> ASP.NET MVP
| > | >> http://asp.net.do/foros/
| > | >> Foros de ASP.NET en Espaņol
| > | >> Ven, y hablemos de ASP.NET...
| > | >> ======================
| > | >>
| > | >> "Olivier Matrot" <ol****************@online.nospam> wrote in
message
| > | >> news:OM****************@TK2MSFTNGP12.phx.gbl...
| > | >>> In ASP.NET 2.0 the thread culture is automatically set to the
| > culture
| > request found in
| > | >>> the headers sent by Internet Explorer.
| > | >>> I'm pretty sure that this will be corrected in the final release,
| > but
| > in the meantime,
| > | >>> I must found a solution to this particular problem.
| > | >>>
| > | >>> Anyway, Internet Explorer has no way to specify 'fr-FR' in the
| > language preferences,
| > | >>> and I do not want my customers to make such a change because of a
| > restriction in the
| > | >>> current Framework release. Firefox have the language 'fr-FR'
| > available.
| > | >>>
| > | >>> Here is the call stack :
| > | >>> System.Globalization.CultureInfo.CheckNeutral(Cult ureInfo culture)
| > +2722547
| > | >>> System.Threading.Thread.set_CurrentCulture(Culture Info value)
+42
| > | >>> System.Web.HttpApplication.SetCulture(Boolean useAppCulture)
| > +3438992
| > | >>> System.Web.HttpApplication.ProcessSpecialRequest(H ttpContext
| > context, MethodInfo
| > | >>> method, Int32 paramCount, Object eventSource, EventArgs eventArgs,
| > HttpSessionState
| > | >>> session) +187
| > | >>>
| > | >>>
| > | >>>
| > | >>>
| > | >>>
| > | >>> "Juan T. Llibre" <no***********@nowhere.com> wrote in message
| > | >>> news:O4**************@TK2MSFTNGP12.phx.gbl...
| > | >>>> Try using "fr-FR" and "de-DE", if you're configuring culture and
| > uiCulture.
| > | >>>>
| > | >>>> If you're using resources, remember that they now go
| > | >>>> in the App_LocalResources directory.
| > | >>>>
| > | >>>>
| > | >>>>
| > | >>>> Juan T. Llibre
| > | >>>> ASP.NET MVP
| > | >>>> http://asp.net.do/foros/
| > | >>>> Foros de ASP.NET en Espaņol
| > | >>>> Ven, y hablemos de ASP.NET...
| > | >>>> ======================
| > | >>>>
| > | >>>> "Olivier Matrot" <ol****************@online.nospam> wrote in
| > message
| > | >>>> news:%2****************@TK2MSFTNGP12.phx.gbl...
| > | >>>>>I encounter a problem with Localization features in ASP.NET 2.0.
| > | >>>>> Is seems that the framework is not able to manage neutral
cultures
| > such as 'fr', or
| > | >>>>> 'de'. Those are the culture sent by default from a french or
| > German
| > Internet
| > | >>>>> Explorer in France or Germany.
| > | >>>>>
| > | >>>>> There is a runtime error "System.NotSupportedException: Culture
| > "fr" is a neutral
| > | >>>>> culture. It can not be used in formatting and parsing and
| > therefore
| > cannot be set as
| > | >>>>> the thread's current culture."
| > | >>>>>
| > | >>>>> However, this happens only the first time a page in the site is
| > accessed. Other hits
| > | >>>>> are processed correctly...
| > | >>>>>
| > | >>>>> TIA.
| > | >>>>
| > | >>>>
| > | >>>
| > | >>>
| > | >>
| > | >>
| > | >
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 19 '05 #9

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

Similar topics

0
533
by: Amin Schoeib | last post by:
Hi, I am a Postgres newbie who worked until now with Oracle. Now I want to know if it is possible (when yes the how?) in Postgresql To set dynamically the Localization? For example in Oracle you...
0
1221
by: Amin Schoeib | last post by:
Hi, I am a Postgres newbie who worked until now with Oracle. Now I want to know if it is possible (when yes the how?) in Postgresql To set dynamically the Localization? For example in Oracle you...
6
1972
by: Rental | last post by:
I'm having the sam problem as described below with the Localization toolkit. Does anyone know if there is a solution to this problem. --->When attempting to generate resource dlls with...
2
1538
by: Julia | last post by:
Hi, We want to migrate out asp application to asp.net and take advantage on localization. I want to ask how it is advice to structure the site directory I am going to use resource only...
5
2636
by: CMM | last post by:
I don't seem to "get" ASP.NET 2.0's Localization features. I've read up on everything... and of course, everything is explained in cursory softball terms- not any "real-world" usage way. I hope...
2
3548
by: bruno | last post by:
I need to localize my ASP.NET app and I just used "Tools" --"generate local resources" command and everything works fine in my WebForms. Resource file name is: MyWebForm.aspx.resx under a subDir...
0
1634
by: shapper | last post by:
Hello, Sometime ago I followed an article (I believe MSDN) related with localization in Asp.Net 2.0. To make pages localization I create a class named Localization: 1 Public Class...
3
2221
by: Corey B | last post by:
I have an ASP.NET application that was built in ASP.NET v1.1. It has a SQL Server back end database. I have been asked to provide an estimate for the level of effort required to produce a Chinese...
3
6459
by: Computer Guru | last post by:
I have a VB.NET 2005 application with several forms and a couple hundred "strings." I've been looking into all the localization improvements in VB.NET, and I can't seem to find anything that...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7287
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,...
0
7353
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...
1
7011
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...
0
7468
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...
0
4689
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...
0
3170
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
747
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
401
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.