-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
CultureInfo.GetCultures returns nothing on iOS platforms with HybridGlobalization enabled #93514
Comments
Tagging subscribers to 'os-ios': @steveisok, @akoeplinger, @kotlarmilos Issue DetailsDescriptionUsing .NET 8 RC2 and enabling HybridGlobalization mode for iOS platform apps (Re. iOS/Mac Catalyst/tvOS etc), calling CultureInfo.GetCultures will always return an empty set. No matter what enum value it's set to, it's always empty. Disabling HybridGlobalization will return the expect lists, but without fields like "NativeName" being set, which is why I want to enable it. CC @rolfbjarne Reproduction Stepsvar 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}");
} Run the following reproduction project: https://github.com/drasticactions/MauiRepros/tree/main/CatalystCultureHybrid With HybridGlobalization disabled, you'll see this: Enabled, you'll see an empty list: ![]() Expected behaviorShould get the list of CultureInfos based on the enum value provided. Actual behaviorNothing is returned. Regression?No response Known WorkaroundsDisable HybridGlobalization, but this will remove other values that would be set with it enabled. Configuration
Other informationNo response
|
Description
Using .NET 8 RC2 and enabling HybridGlobalization mode for iOS platform apps (Re. iOS/Mac Catalyst/tvOS etc), calling CultureInfo.GetCultures will always return an empty set. No matter what enum value it's set to, it's always empty. Disabling HybridGlobalization will return the expect lists, but without fields like "NativeName" being set, which is why I want to enable it.
CC @rolfbjarne
Reproduction Steps
Run the following reproduction project: https://github.com/drasticactions/MauiRepros/tree/main/CatalystCultureHybrid
With HybridGlobalization disabled, you'll see this:

Enabled, you'll see an empty list:
Expected behavior
Should get the list of CultureInfos based on the enum value provided.
Actual behavior
Nothing is returned.
Regression?
No response
Known Workarounds
Disable HybridGlobalization, but this will remove other values that would be set with it enabled.
Configuration
Other information
No response
The text was updated successfully, but these errors were encountered: