Search code examples
ioslocalizationpush-notificationwatchkitapple-watch

WatchKit: How to localize system-provided Dismiss button?


Notification interface has predefined Dismiss button, and I’m looking for the way to add localization for it.

enter image description here

Is there any way to do this? I haven’t found the answer in the docs.

Thanks in advance for the help.


Solution

  • You can not change title of Dismiss button by yourself - it is managed by iOS and will be localised according to language preferences on a device. Dismiss button will be always present on notification interface to dismiss/close the corresponding view and third-party developers can not influence on Dismiss button behaviour and style.

    But you can add extra buttons on your notification with needed titles and actions - here is detailed manual by Apple itself: https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/BasicSupport.html#//apple_ref/doc/uid/TP40014969-CH18-SW1