Skip to content
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

en_GB incorrectly resets to en_US for date pickers #173

Closed
yunruse opened this issue Jan 26, 2024 · 0 comments · Fixed by #174
Closed

en_GB incorrectly resets to en_US for date pickers #173

yunruse opened this issue Jan 26, 2024 · 0 comments · Fixed by #174

Comments

@yunruse
Copy link
Contributor

yunruse commented Jan 26, 2024

  2024-01-26 at 18 20 18

As can be seen, US-style date pickers are being used – the week starts on Sunday rather than Monday; the date is MM/DD/YYYY rather than DD/MM/YYYY – even though for this screenshot the language is set to en_GB. Because the localisation file is en.lproj, the following branch is followed no matter what, resetting localisation to en_US:

if Bundle.main.path(forResource: currentLocale.identifier, ofType: "lproj") == nil {
// Return the default locale if translation to system language does not exist
return Locale(identifier: "en_US")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant