-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting No Names in regioninfo class on IOS #15159
Comments
This might be related to dotnet/runtime#68321 or dotnet/runtime#69492. |
Sample code: var regions = CultureInfo.GetCultures (CultureTypes.SpecificCultures)
.Select (culture => new RegionInfo (culture.Name))
.OrderBy (v => v.ThreeLetterISORegionName);
foreach (var r in regions) {
Console.WriteLine ($"{r.ThreeLetterISORegionName} {r.NativeName} {r.Name} {r.EnglishName} {r.DisplayName}");
} With iOS (both simulator and device) and Mac Catalyst, I get this:
on macOS, I get:
Looks like it could be a difference between Mono and CoreCLR, so I'm moving to dotnet/runtime. |
This issue was moved to dotnet/runtime#70028 |
Thank you for trying out yourself and posting that to dotnet/runtime group. |
@whann0205 it will take some time for them to fix the issue, and I don't think there's workaround to make the RegionInfo class return the full strings, because the full strings just aren't available. That said, it might be possible to replicate using NSLocale, something like this: foreach (var country in NSLocale.ISOCountryCodes) {
Console.WriteLine ($"{country}: {NSLocale.CurrentLocale.GetCountryCodeDisplayName (country)}");
} |
Thank you. You know, its really annoying that things get broken over and over again. Besides i cannot use that NSLocaleExample of yours since using Foundation for example does |
I'm sorry about the troubles you're running into :/ I also don't know anything about Blazor, but maybe asking here could be an idea: https://github.com/dotnet/maui/discussions? |
Dont know if this is the correct place to report that question.
If not please be so kind and direct me to the correct forum or
forward my issue to them.
Environment:
Win10
Visual Studio 2022 Preview lastest revision all updates installed
Net Maui lastest revision all updates installed
MacOS Monterrey on MacBook Air M1
Visual Studio 2022 Preview lastest revision all updates installed
Net Maui lastest revision all updates installed
Attached you find a screenshot what happens when i debug the application
on an android target (works ok)
and a screenshot from the same workstation targetting
the macbook´s simulator.
Have updated Xamarin IOS to the latest version
as was suggested by the macbooks´s visual studio
check for updates dialog.
Problem is clear to see i dont get any country names only the 3letter or 2letter code.
The text was updated successfully, but these errors were encountered: