-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[release/6.0] Detect the default locale name during startup on Apple platforms #68934
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
Conversation
This change adds a function to lookup the current NSLocale and extract the language + country code to load into ICU by default. Previously, we would defer to uloc_getDefault in ICU, which would return a value we would ignore (en_US_POSIX) and result in falling back to invariant mode. Fixes #68321
|
Tagging subscribers to this area: @dotnet/area-system-globalization Issue DetailsBackport of #68706 to release/6.0 /cc @steveisok Customer ImpactTestingRiskIMPORTANT: If this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.
|
|
Tagging subscribers to 'os-ios': @steveisok, @akoeplinger Issue DetailsBackport of #68706 to release/6.0 /cc @steveisok Customer ImpactTestingRiskIMPORTANT: If this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.
|
|
Code complete is today, plese get this in. |
|
Approved over email |
Backport of #68706 to release/6.0
/cc @steveisok
Customer Impact
Previously on all Apple platforms, we have delegated to ICU to tell us what the user's default locale was. We would then map the return value (en_US_POSIX) to an empty string, which means invariant mode. The behavior conflicted with the legacy xamarin experience that would look up the system locale set by the user. This change brings over what we had before.
Testing
Added a unit test to detect if the default current culture is not in invariant mode
Risk
Low - although note this change does apply to desktop as well as iOS, tvOS, and MacCatalyst.
IMPORTANT: If this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.