Skip to content

Commit 7b933b4

Browse files
authored
Add a note about configuring Blazor Wasm culture using JavaScript (#20231)
1 parent e7ab251 commit 7b933b4

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

aspnetcore/blazor/globalization-localization.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,19 @@ By default, Blazor WebAssembly carries minimal globalization resources required
6868
</PropertyGroup>
6969
```
7070

71+
Blazor WebAssembly can also be configured to launch using a specific application culture using options passed to `Blazor.start`. For instance, the sample below shows an app configured to launch using the `en-GB` culture:
72+
73+
```html
74+
<script src="_framework/blazor.webassembly.js" autostart="false"></script>
75+
<script>
76+
Blazor.start({
77+
applicationCulture: 'en-GB'
78+
});
79+
</script>
80+
```
81+
82+
The value for `applicationCulture` should conform to the [BCP-47 language tag format](https://tools.ietf.org/html/bcp47).
83+
7184
If the app doesn't require localization, you may configure the app to support the invariant culture, which is based on the `en-US` culture:
7285

7386
```xml

0 commit comments

Comments
 (0)