小编Tim*_*imo的帖子

如何本地化标题和描述?(本地化字符串资源)

我正在开发我的 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)

任何帮助或链接表示赞赏。谢谢 :)

localization swift swiftui ios16 appintents

7
推荐指数
1
解决办法
1820
查看次数

标签 统计

appintents ×1

ios16 ×1

localization ×1

swift ×1

swiftui ×1