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
Follow up to #2532. If an app configures a culture other than the device's default, Blazor uses it for binding, parsing and localization. However, the UI controls within the web view continue to use the device default culture.
Steps to Reproduce
File -> New .NET MAUI Blazor app
Update MauiProgram.cs to configure a culture e.g. CultureInfo.CurrentCulture = CultureInfo.CurrentUICulture = new CultureInfo("fr-FR");
Resolving this. Using DefaultThreadCurrentCulture instead of CurrentCulture does the right thing. My guess is that the WebView component is rendered from a different context and configuring CurrentCulture is not sufficient as it does not flow across Thread / async boundaries.
Description
Follow up to #2532. If an app configures a culture other than the device's default, Blazor uses it for binding, parsing and localization. However, the UI controls within the web view continue to use the device default culture.
Steps to Reproduce
CultureInfo.CurrentCulture = CultureInfo.CurrentUICulture = new CultureInfo("fr-FR");
Expected: The input appears using French localization
Actual: The bound value uses the French locale, but the input uses the device's culture.
Version with bug
Preview 12 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
n/a
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: