I want to use the CultureInfo.NativeName but something is off. I always get a two letter combination as output. Ex sv (SE), en (US), es (BR). I created a completly new blazor project (WASM), ran the code there - same result, asked a colleague - same result. However, when I run it at https://dotnetfiddle.net/ I get the correct outputs.
The docs says it should work like it does in the dotnetfiddle. What can be wrong?
The issue only emerges in Blazor WASM.
Here is my test code:
var test = new CultureInfo("sv-SE");
Console.WriteLine("Native: " + test.NativeName);
Console.WriteLine("Name: " + test.Name);
Console.WriteLine("Display: " + test.DisplayName);
Console.WriteLine("English: " + test.EnglishName);
Output:
Type | My results | Sandbox |
---|---|---|
Native | sv (SE) | svenska (Sverige) |
Name | sv-SE | sv-SE |
Display | sv (SE) | Swedish (Sweden) |
English | sv (SE) | Swedish (Sweden) |