Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Missing Remarks For CultureInfo About InvariantGlobalization #10271

Copy link
Copy link
Open
@charleyah

Description

@charleyah
Issue body actions

Type of issue

Missing information

Description

There is no remarks about how InvariantGlobalization impacts what CultureInfo is decided for the relevant static properties.

I could not detect the system culture set by the user through the following properties because InvariantGlobalization had been enabled by default without my acknowledgement when I created a new .NET 8 C# project in VS 2022.

CultureInfo.CurrentCulture 
CultureInfo.CurrentUICulture
CultureInfo.InstalledUICulture

I only discovered InvariantGlobalization was enabled after trying to find non-invariant culture by name using CultureInfo.GetCultureInfo

CurrentCultures are more complex due to being per thread and changable, but I think at least InstalledUICulture needs some remarks about being overriden by InvariantGlobalization.

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo?view=net-8.0

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Globalization/CultureInfo.xml

Document Version Independent Id

4c239615-7734-6c50-7802-99e401b0eb28

Article author

@dotnet-bot

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.