diff --git a/aspnetcore/blazor/globalization-localization.md b/aspnetcore/blazor/globalization-localization.md index 882af2d91262..dd9bd5654806 100644 --- a/aspnetcore/blazor/globalization-localization.md +++ b/aspnetcore/blazor/globalization-localization.md @@ -363,8 +363,12 @@ CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US"); CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo("en-US"); ``` +:::moniker range="< aspnetcore-10.0" + > [!NOTE] -> Currently, Blazor WebAssembly apps only load resources based on . For more information, see [Blazor WASM only relies on the current culture (current UI culture isn't respected) (`dotnet/aspnetcore` #56824)](https://github.com/dotnet/aspnetcore/issues/56824). +> In .NET 9 or earlier, standalone Blazor WebAssembly apps load UI globalization resources based on . If you want to additionally load globalization data for your localization culture defined by , [upgrade the app to .NET 10 or later](xref:migration/index). + +:::moniker-end Use the `CultureExample1` component shown in the [Demonstration component](#demonstration-component) section to study how globalization works. Issue a request with United States English (`en-US`). Switch to Costa Rican Spanish (`es-CR`) in the browser's language settings. Request the webpage again. When the requested language is Costa Rican Spanish, the app's culture remains United States English (`en-US`). @@ -507,8 +511,12 @@ CultureInfo.DefaultThreadCurrentUICulture = culture; await host.RunAsync(); ``` +:::moniker range="< aspnetcore-10.0" + > [!NOTE] -> Currently, Blazor WebAssembly apps only load resources based on . For more information, see [Blazor WASM only relies on the current culture (current UI culture isn't respected) (`dotnet/aspnetcore` #56824)](https://github.com/dotnet/aspnetcore/issues/56824). +> In .NET 9 or earlier, standalone Blazor WebAssembly apps load UI globalization resources based on . If you want to additionally load globalization data for your localization culture defined by , [upgrade the app to .NET 10 or later](xref:migration/index). + +:::moniker-end The following `CultureSelector` component shows how to perform the following actions: @@ -1004,8 +1012,16 @@ CultureInfo.DefaultThreadCurrentUICulture = culture; await host.RunAsync(); ``` +:::moniker-end + +:::moniker range=">= aspnetcore-8.0 < aspnetcore-10.0" + > [!NOTE] -> Currently, Blazor WebAssembly apps only load resources based on . For more information, see [Blazor WASM only relies on the current culture (current UI culture isn't respected) (`dotnet/aspnetcore` #56824)](https://github.com/dotnet/aspnetcore/issues/56824). +> In .NET 9 or earlier, standalone Blazor WebAssembly apps load UI globalization resources based on . If you want to additionally load globalization data for your localization culture defined by , [upgrade the app to .NET 10 or later](xref:migration/index). + +:::moniker-end + +:::moniker range=">= aspnetcore-8.0" Add the following `CultureSelector` component to the `.Client` project. diff --git a/aspnetcore/release-notes/aspnetcore-10.0.md b/aspnetcore/release-notes/aspnetcore-10.0.md index 4effae2df92f..fc26376f6dbe 100644 --- a/aspnetcore/release-notes/aspnetcore-10.0.md +++ b/aspnetcore/release-notes/aspnetcore-10.0.md @@ -4,7 +4,7 @@ author: wadepickett description: Learn about the new features in ASP.NET Core in .NET 10. ms.author: wpickett ms.custom: mvc -ms.date: 09/09/2025 +ms.date: 09/15/2025 uid: aspnetcore-10 --- # What's new in ASP.NET Core in .NET 10 diff --git a/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md b/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md index 57d917eb7d4d..549e2ade6851 100644 --- a/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md +++ b/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md @@ -759,3 +759,7 @@ public int CounterNotRestoredOnReconnect { get; set; } ``` Call `PersistentComponentState.RegisterOnRestoring` to register a callback for imperatively controlling how state is restored, similar to how provides full control of how state is persisted. + +### Blazor WebAssembly respects the current UI culture setting + +In .NET 9 or earlier, standalone Blazor WebAssembly apps load UI globalization resources based on . If you want to additionally load globalization data for your localization culture defined by , [upgrade the app to .NET 10 or later](xref:migration/index).