Skip to content

HybridGlobalization doesn't work anymore in aspnetcore 10 RC 1 / Blazor WebAssembly #63792

@ysmoradi

Description

@ysmoradi

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Discussion link

I used to enable HybridGlobalization in my blazor webassembly projects and I could change culture at runtime programmatically at anytime, but now, in .NET 10 RC 1, it forces me to enable BlazorWebAssemblyLoadAllGlobalizationData, resulting into more additional files download and 150KB (Brotli Compressed) download size )":

Doesn't HybridGlobalization mean it would use browser's data instead of relying on dotnet .dat files as much as possible?

In order to test, try opening https://adminpanel.bitplatform.dev (Would work) and https://todo.bitplatform.dev (Wouldn't work) on non-English browser.

Error:

ManagedError: AggregateException_ctor_DefaultMessage (Blazor detected a change in the application's culture that is not supported with the current project configuration. To change culture dynamically during startup, set <BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData> in the application's project file.)

Expected Behavior

Creating new CultureInfo() should work with HybridGlobalization just like .NET 9, because browser is providing culture data for all cultures and no need to download additional 150KB

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

10.0.100-rc.1.25451.107

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions