widget configurationDisplayName and description Localization

Viewed 10

enter image description here

I want to localize the widget description. I tried as below, but localization is not applied.

@main
struct RelaxOnWidget: Widget {
    let kind: String = "RelaxOnWidget"
    
    var body: some WidgetConfiguration {
        StaticConfiguration(kind: kind, provider: Provider(), content: { entry in
            RelaxOnWidgetEntryView(entry: entry)
        })
        .configurationDisplayName(LocalizedStringKey("Recently Played"))
        .description(LocalizedStringKey("Quickly access recently played CDs."))
        .supportedFamilies([.systemSmall])
    }
}

It seems to support localization because it works as below, but I don't know why it doesn't. Can I get some advice on this? enter image description here

0 Answers
Related