Hello,
I am trying to show a localized image using SwiftUI's Image() by overridding the system locale like this:
.environment(\.locale, Locale.init(identifier: "nl"))
Both the preview and the actual app are still showing the default (fallback) image, not the localized version.
The image is localized in a catalog (xcassets) as described here. - https://developer.apple.com/documentation/xcode/localization/localizing_assets_in_a_catalog.
When I change my system locale (to "nl") the correct image appears.
What am I doing wrong, or is this a bug in SwiftUI?
Thanks.
1
0
1.6k