Hello,
I am facing one issue in implementing localization in local notifications. I am using the action buttons so that users can take action from the notifications. A strange thing is happening while showing the notification in Spanish; the description shows in Spanish and the action buttons are in English and vice-versa. I have used the below code as per the Apple documentation but still no solution:
let logNow = NSLocalizedString("Log Now", comment: "Alert")
let logNowAction = UNNotificationAction(identifier: "LOG_NOW_ACTION", title: NSString.localizedUserNotificationString(forKey: logNow, arguments: nil),options: [.foreground])
UNNotificationCategory(identifier: "CATEGORY_REMINDERS",
actions: [logNowAction],
intentIdentifiers: [],
hiddenPreviewsBodyPlaceholder: "",
options: .customDismissAction)
NSString.localizedUserNotificationString(forKey: logNow, arguments: nil)
Please help. Any pointers would be appreciated!
Regards,
Sunil
Topic:
Accessibility & Inclusion
SubTopic:
General
Tags:
Localization
Notification Center
User Notifications