In the current XCode version (14.3), localized strings are not shown in preview, instead the key is shown. They show in Simulator and on device though. Can someone confirm this behaviour or am I missing a setting or so?
Example
Localized.strings (de): "price" = "Preis";
Code:
Text("price")
Preview*:
price
Simulator / device:
Preis
*) For the preview I am using:
ContentView()
.environment(\.locale, .init(identifier: "de"))
as described here: https://developer.apple.com/documentation/xcode/previewing-localizations
I got the same issue and I fixed it by cleaning the build folder. Command+Shift+K or via the menu bar: Product -> Clean Build Folder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With