Issue with Azerbaijani ("az-AZ") Culture in .NET 8 Blazor WebAssembly Standalone App

Khalig 0 Reputation points
2024-07-10T06:37:31.2766667+00:00

Hello,

I am working on a .NET 8 Blazor WebAssembly Standalone App, and I have encountered an issue with setting the "az-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:

  1. Added the culture settings to Program.cs:
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("az-AZ");
CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo("az-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!

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,863 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,580 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.