Default Culture in VS2008?

J

JimLad

Hi,

I am trying to understand how VS2008 (3.5) decides on the current
culture. I am finding this very confusing.

I have checked my web.config and machine.config and neither have a
globalisation page. I thought that would mean that it would pick up
regional settings but it didn't seem to. Then I looked at the ASP.NET
page in IIS - it shows a culture of af-ZA (Afrikaans - South Africa).

Where is it getting this from? This is not the culture on the machine
and noone would have ever set it to this culture... What on earth is
going on?

Cheers,

James
 
G

Guest

Hi,

I am trying to understand how VS2008 (3.5) decides on the current
culture. I am finding this very confusing.

I have checked my web.config and machine.config and neither have a
globalisation page. I thought that would mean that it would pick up
regional settings but it didn't seem to. Then I looked at the ASP.NET
page in IIS - it shows a culture of af-ZA (Afrikaans - South Africa).

Where is it getting this from? This is not the culture on the machine
and noone would have ever set it to this culture... What on earth is
going on?

Cheers,

James

Hi James,

first of all, this is not related to VS2008. The website takes
configuration from the web.config file and server settings, but not
from IDE.

You problem seems to be caused by IIS configuration. Go to IIS, right-
click your website and select properties, then go to ASP.NET tab,
click Edit configuration and then Application. And check what
Globalization Settings it has.

Hope this helps
 
J

JimLad

Hi James,

first of all, this is not related to VS2008. The website takes
configuration from the web.config file and server settings, but not
from IDE.

You problem seems to be caused by IIS configuration. Go to IIS, right-
click your website and select properties, then go to ASP.NET tab,
click Edit configuration and then Application. And check what
Globalization Settings it has.

Hope this helps- Hide quoted text -

- Show quoted text -

Hi Alexey,

Yep sorry about that. Obviously this is Framework/IIS related, not
VisualStudio related.

Yes it is the IIS ASP.NET showing the af-ZA culture. That's already
established. I am just confused as to where this value is coming from?
This must be a default setting somewhere as I certainly didn't change
it and neither did any of my colleagues. It is also not the regional
setting on the machine. Is this a default setting in IIS?

James
 
G

Guest

Hi Alexey,

Yep sorry about that. Obviously this is Framework/IIS related, not
VisualStudio related.

Yes it is the IIS ASP.NET showing the af-ZA culture. That's already
established. I am just confused as to where this value is coming from?
This must be a default setting somewhere as I certainly didn't change
it and neither did any of my colleagues. It is also not the regional
setting on the machine. Is this a default setting in IIS?

James- Hide quoted text -

- Show quoted text -

It seems that this is by default for IIS6. It simply set af-ZA because
it is the first item in the culture list. This behavior seems to have
been changed in IIS7 (Windows 2008) and has became more clever: by
default culture and uiculture is set to "Invariant Language (Invariant
Country)".
 
J

JimLad

It seems that this is by default for IIS6. It simply set af-ZA because
it is the first item in the culture list. This behavior seems to have
been changed in IIS7 (Windows 2008) and has became more clever: by
default culture and uiculture is set to "Invariant Language (Invariant
Country)".- Hide quoted text -

- Show quoted text -

But Invariant Language (Invariant Country) uses American date format,
but I was getting British/Afrikaans date format. So looks like IIS
actually uses the AF-ZA value, rather than just having an erroneous
display... As I am based in the UK I was by pure fluke getting the
right format. By the way, my dev machine is XP, using IIS 5.

Thanks for the help. I'll be adding a Globalization section to all my
web.configs from now on!

e.g.
<!-- Set date formats and currency formats and insulate
application against external changes on the server.-->
<globalization uiCulture="en-GB" culture="en-GB" />

James
 
P

Patrice

Do you have defined a language in your browser perhaps just as a test ? Or
you have deleted all languages ?

Not sure but the default could be "auto" in which case ASP.NET will use the
preferred language transmitted by your browser(by using the accept-language
http header)...
 
G

Guest

But Invariant Language (Invariant Country) uses American date format,
but I was getting British/Afrikaans date format. So looks like IIS
actually uses the AF-ZA value, rather than just having an erroneous
display... As I am based in the UK I was by pure fluke getting the
right format. By the way, my dev machine is XP, using IIS 5.

As I mentioned, invariant culture is set by default in IIS7 under
Win2008. Under XP and Win2003 I see the same af-ZA by default.
 

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

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top