danroth27 / Net8BlazorWebAssembly

ASP.NET Core hosted Blazor WebAssembly app with .NET 8
MIT License
31 stars 9 forks source link

Issue with Azerbaijani Culture in .NET 8 Blazor WebAssembly Standalone App #10

Open xalidos opened 3 months ago

xalidos commented 3 months ago

Hello,

I am working on a .NET 8 Blazor WebAssembly Standalone App, and I have encountered an issue with setting the "az-Latn-AZ" (Azerbaijani) culture. While other cultures work correctly, Azerbaijani does not seem to be applied properly. Specifically, the ToLower function does not convert "Iı" to "ıı" as expected. Instead, it outputs "iı".

Here are the steps I've taken:

Added the culture settings to Program.cs:

CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("az-Latn-AZ"); 
CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo("az-Latn-AZ");

Added globalization settings to the project file (.csproj):

<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData> However, when I run the following code:

var toLower = "Iı".ToLower(); // Azerbaijani alphabet The output is "iı" instead of the expected "ıı".

Could anyone provide guidance on what might be going wrong or how to ensure the Azerbaijani culture settings are correctly applied in my Blazor WebAssembly app?

Thank you!