Skip to content

Commit 63109e5

Browse files
authored
Globalization/ICU file updates (#36178)
1 parent 7de7f61 commit 63109e5

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

aspnetcore/blazor/globalization-localization.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to render globalized and localized content to users in di
55
monikerRange: '>= aspnetcore-3.1'
66
ms.author: wpickett
77
ms.custom: mvc
8-
ms.date: 11/12/2024
8+
ms.date: 10/02/2025
99
uid: blazor/globalization-localization
1010
---
1111
# ASP.NET Core Blazor globalization and localization
@@ -75,15 +75,40 @@ The following field types have specific formatting requirements and aren't suppo
7575

7676
For current browser support of the preceding types, see [Can I use](https://caniuse.com).
7777

78+
By default, Blazor loads a subset of globalization data that contains the app's culture. To load all globalization data, set `<BlazorWebAssemblyLoadAllGlobalizationData>` to `true` in the app's project file (`.csproj`):
79+
80+
```xml
81+
<PropertyGroup>
82+
<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
83+
</PropertyGroup>
84+
```
85+
7886
## .NET globalization and International Components for Unicode (ICU) support (Blazor WebAssembly)
7987

8088
:::moniker range=">= aspnetcore-8.0"
8189

82-
Blazor WebAssembly uses a reduced globalization API and set of built-in International Components for Unicode (ICU) locales. For more information, see [.NET globalization and ICU: ICU on WebAssembly](/dotnet/core/extensions/globalization-icu#icu-on-webassembly).
90+
Blazor WebAssembly uses a reduced globalization API and set of built-in International Components for Unicode (ICU) locales.
91+
92+
In WebAssembly (Wasm) apps, when globalization invariant mode is disabled, an ICU data file is loaded. There are four basic types of these files:
93+
94+
* `icudt.dat`: Full data
95+
* `icudt_EFIGS.dat`: Data for locales: `en-*`, `fr-FR`, `es-ES`, `it-IT`, and `de-DE`.
96+
* `icudt_CJK.dat`: Data for locales: `en-*`, `ja`, `ko`, and `zh-*`.
97+
* `icudt_no_CJK.dat`: Data for all locales from `icudt.dat`, excluding `ja`, `ko`, and `zh-*`.
98+
99+
Specify one file to load with the `<BlazorIcuDataFileName>` MSBuild property in the app's project file (`.csproj`). The following example loads the `icudt_no_CJK.dat` file:
100+
101+
```xml
102+
<PropertyGroup>
103+
<BlazorIcuDataFileName>icudt_no_CJK.dat</BlazorIcuDataFileName>
104+
</PropertyGroup>
105+
```
106+
107+
`<BlazorIcuDataFileName>` only accepts a single file. The file can be a custom file created by the developer. To create a custom ICU file, see [WASM Globalization Icu: Custom ICU](https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-icu-wasm.md#custom-icu).
83108

84-
<!-- UPDATE 10.0 Tooling features for building custom ICU data file -->
109+
If a file isn't specified with `<BlazorIcuDataFileName>`, the app's culture is checked, and the corresponding ICU file is loaded for its culture. For example, the `en-US` culture results in loading the `icudt_EFIGS.dat` file. For `zh-CN`, the `icudt_CJK.dat` file is used.
85110

86-
To load a custom ICU data file to control the app's locales, see [WASM Globalization Icu](https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-icu-wasm.md). Currently, manually building the custom ICU data file is required. .NET tooling to ease the process of creating the file is planned for .NET 10 in November, 2025.
111+
For more information, see [.NET globalization and ICU: ICU on WebAssembly](/dotnet/core/extensions/globalization-icu#icu-on-webassembly).
87112

88113
:::moniker-end
89114

0 commit comments

Comments
 (0)