ios - 推送通知参数本地化

标签 ios iphone push-notification apple-push-notifications

我知道可以使用 title-loc-keytitle-loc-args 本地化推送通知的消息和标题定位键定位参数。因此,系统在应用程序包中搜索本地化标题格式字符串(title-loc-key)并将格式说明符替换为 title-loc-args

我的问题是是否可以本地化推送通知的参数?以便系统将格式化字符串的格式说明符替换为本地化的 title-loc-args(参数替换为在应用程序包中找到的本地化值)。

例如:

通知:

`title-loc-key`= "localization_key_shipping"
`title-loc-args`= ["localization_key_headset"]

本地化英语:

"localization_key_shipping" = "Your %@ is ready for shipping"
"localization_key_headset" = "headset";

我可以让这项工作看到“您的耳机已准备好发货”吗?

感谢您的所有建议和评论。

最佳答案

不,您的服务器端代码应该为参数提供本地化文本。 See Apple docs .

关于ios - 推送通知参数本地化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30510395/

相关文章:

ios - UIViewRepresentable.updateUIView(_ :context:) is not called when @State, @Binding 或 @EnvironmentObject 已更改

ios - 在 GSMapView 中添加标记

iphone - 如何使 Xcode 自动完成委托(delegate)方法?

node.js - 在云函数中,我如何从另一个集合中加入以获取数据?

android - FCM : Displaying emoji or UTF-8 text on iOS that is sent from Android device

iOS 11 UITableView performBatchUpdates 完成关闭未被调用

ios - 更改 UIImage 或 UIGraphics 的文本颜色

ios - UIDatePicker 结果到 dateByAddingTimeInterval

javascript - jQuery 将 iframe 写入 XLS 导致 iPhone 上的沙箱访问冲突

windows-phone-7 - 每天 toast 通知