You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/blazor/globalization-localization.md
+29-4Lines changed: 29 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Learn how to render globalized and localized content to users in di
5
5
monikerRange: '>= aspnetcore-3.1'
6
6
ms.author: wpickett
7
7
ms.custom: mvc
8
-
ms.date: 11/12/2024
8
+
ms.date: 10/02/2025
9
9
uid: blazor/globalization-localization
10
10
---
11
11
# ASP.NET Core Blazor globalization and localization
@@ -75,15 +75,40 @@ The following field types have specific formatting requirements and aren't suppo
75
75
76
76
For current browser support of the preceding types, see [Can I use](https://caniuse.com).
77
77
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`):
## .NET globalization and International Components for Unicode (ICU) support (Blazor WebAssembly)
79
87
80
88
:::moniker range=">= aspnetcore-8.0"
81
89
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:
`<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).
83
108
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.
85
110
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).
0 commit comments