Replies: 1 comment 1 reply
|
This all sounds reasonable enough! Wanna open a PR? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Foundation added
Locale.preferredLocales, butswift-dependenciescurrently only exposes@Dependency(\.locale).The two values serve different purposes.
localeis the app’s current formatting and regional locale.preferredLocalesis an ordered list used for content-language selection and matching.Would you be open to adding this?
A possible implementation:
Tests could override it normally:
Swift Foundation implements
Locale.preferredLocalesin terms ofLocale.preferredLanguages:The implementation has no deployment constraints itself, so the dependency could be back-deployed rather than restricted to OS 26.
I’m happy to open a PR if this sounds useful.
All reactions