I’m trying to list all the cultures available in a dropdown so that end user can choose a language-REGION
locale code.
I have <BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
enabled in .csproj
and I’m using the following code in my .NET8 Blazor WASM
app.
<InputSelect @bind-Value="Locale" id="Locale" class="input">
<option value="">Select</option>
@foreach (var culture in CultureInfo.GetCultures(CultureTypes.SpecificCultures))
{
<option checked="@(Settings.GeneralSettings.Locale == culture.Name)" value="@culture.Name">@culture.EnglishName</option>
}
</InputSelect>
I only see the below list which contains ar-SA (arabic-SAUDIARABIA)
but not ar-KW (arabic-KUWAIT)
I tried installing the language in my Windows 10
machine as shown below but still not appearing even after restart.
Then I thought I should install it in browser languages. But not able to find arabic-KUWAIT
in browser language list and ended up installing just Arabic
. Here is what I see in Google Chrome latest version
as of writing this.
I’m confused on what I’m missing. Please assist me.