AttributedString Localization does not seem to work

I have this code

struct TestAppleSuggestion: View {
   
    @Environment(\.locale) var locale: Locale
 
    var body: some View {
        VStack {
           
            VStack {
                Text("locale: \(locale.identifier)")
                Text(AttributedString(localized: LocalizedStringResource(
                    "welcome",
                    locale: locale
                )))
                Text(AttributedString(localized:
                    "welcome",
                    locale: locale
                ))
            }

        }
    }

}

#Preview {
    TestAppleSuggestion().environment(\.locale, Locale(identifier: "fr-CA"))
}

Heres What I see in SwiftUi Previews

The Localization is working for the LocalizedStringResource but not to the AttributedString.

Why?

AttributedString(localized: "welcome", locale: locale) does return the localized version string for me. Would you mind to share your test project and the detailed steps you used to observe the issue? Thanks.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

AttributedString Localization does not seem to work
 
 
Q