-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[release/8.0][Apple] Use NSLocale.preferredLanguages on for default locale name #102748
[release/8.0][Apple] Use NSLocale.preferredLanguages on for default locale name #102748
Conversation
Tagging subscribers to this area: @dotnet/area-system-globalization |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
Today is code complete for the July Release. Has this been approved by Tactics? |
There's also many CI failures. Can you please check if they're related to this PR? |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
The failures on |
ad90ca5
into
dotnet:release/8.0-staging
Description
In this PR, we change the
DetectDefaultAppleLocaleName
to use the ObjCpreferredLanguages
API to retrieve the device's primary language. This will make sure that users can retrieve the correct locale and use localized strings as expected.Note, this doesn't change the specific whitelisting done for mobile .NET 8 ICU https://github.com/dotnet/icu/blob/dotnet/main/icu-filters/icudt_mobile.json#L8-L194. Users will be able retrieve the underlining ICU data (e.g.
DateTimeFormat
) only for the locales specifically included the ICU pack.Customer Impact
Customer reported incorrect locale returned when setting iPhone region to "China mainland" and language to "Chinese Traditional". Returned
zh-CN
instead ofzh-Hant-CN
.Regression
Testing
Tested locally on iOS simulator by copying new
libSystem.Globalization.Native.dylib
andlibmonosgen-2.0.dylib
into a local version of dotnet and building customer provided MAUI repro app. Verified that the MAUI repro works as expected with the fix included in this PR.Risk
Affects Globalization code on Apple mobile scenario.