https://github.com/below/nol10npreview
https://github.com/below/nol10npreview
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/below/nol10npreview
- Owner: below
- Created: 2025-07-21T19:55:47.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-07-21T20:21:24.000Z (8 months ago)
- Last Synced: 2025-07-21T22:25:42.931Z (8 months ago)
- Language: Swift
- Size: 11.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Feedback FB18965357
## Xcode Preview: Formatter does not honor .environment(\.locale … )
In a SwiftUI preview, the locale set with .environment(\.locale, .init(identifier: "fr")) is not honored by formatters, like DateFormatter or NumberFormatter. It would be good if parts of the view dependent on such formatters could be localized in the preview.

In the above image, the text is localized, but the first date is not. For the second date, the formatter has been explicitly initialized with a locale.