2

What's the Notification.Name equivalent for NSCurrentLocaleDidChangeNotification?

Gargoyle
  • 9,590
  • 16
  • 80
  • 145
  • NSLocale.currentLocaleDidChangeNotification is the equivalent of NSCurrentLocaleDidChangeNotification as Martin R said. – Natarajan Sep 19 '16 at 07:02

1 Answers1

5

According to the NSLocale reference there is

class let currentLocaleDidChangeNotification: NSNotification.Name
// Notification that indicates that the user’s locale changed.

which you can use as

let notification = NSLocale.currentLocaleDidChangeNotification
Martin R
  • 529,903
  • 94
  • 1,240
  • 1,382
  • 2
    Silly me thinking it would be in the newer Locale class ;) – Gargoyle Sep 19 '16 at 08:20
  • Yes, the overlay type Locale does not provide all NSLocale methods. Here is another example: http://stackoverflow.com/questions/39519144/nslocale-swift-3 – Martin R Sep 19 '16 at 08:26