我正在开发我的 SwiftUI 项目,并为快捷方式应用程序添加了一些 AppIntents。目前我无法本地化标题和描述。标题和描述的类型为 LocalizedStringResource(iOS16+ 提供)。
我尝试将以下代码本地化为德语,但我不知道该怎么做。
struct Add_Memory_Shortcut: AppIntent {
// The name of the action in Shortcuts
// TODO: Localization
static var title : LocalizedStringResource = "Create Memory"
// Description of the action in Shortcuts
// Category name allows you to group actions - shown when tapping on an app in the Shortcuts library
static var description: IntentDescription = IntentDescription("Create a new memory", categoryName: "Creating")
}
Run Code Online (Sandbox Code Playgroud)
任何帮助或链接表示赞赏。谢谢 :)