https://github.com/sql-mistermagoo/localizationbug
Demonstrates incorrect localization behaviour in Blazor WebAssembly
https://github.com/sql-mistermagoo/localizationbug
Last synced: 6 months ago
JSON representation
Demonstrates incorrect localization behaviour in Blazor WebAssembly
- Host: GitHub
- URL: https://github.com/sql-mistermagoo/localizationbug
- Owner: SQL-MisterMagoo
- Created: 2020-08-27T00:31:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-27T00:31:57.000Z (almost 6 years ago)
- Last Synced: 2025-02-05T03:23:23.141Z (over 1 year ago)
- Language: HTML
- Size: 210 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Localization Bug
The `IStringLocalizer` is using the `CurrentCulture` to look up resources, instead of using the CurrentUICulture as it does in Server side aspnetcore/Blazor.
Possibly caused by this line of code?
https://github.com/dotnet/aspnetcore/blob/a4938d07a5127ffad8466ddf703a6b5b21f4b0c9/src/Components/WebAssembly/WebAssembly/src/Hosting/SatelliteResourcesLoader.cs#L29
` var culturesToLoad = GetCultures(CultureInfo.CurrentCulture);`
As you can see it is loading the CurrentCulture satellite assemblies, not CurrentUICulture.