473,218 Members | 1,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,218 software developers and data experts.

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 2518
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
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
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
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
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
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
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
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
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
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
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.