There is no event, because changing the language will kill all running apps. So when you app is started again you can detect if the language is switched if you save the previous language some where.
Event for language settings gets changed in iOS app
-
30-06-2023 - |
Domanda
I am developing universal iOS app with localization support. I can detect the current language used by application , but I want to know when user changes the language from
General -> International -> Language -> <new language>
I need to make some changes in user settings on backend server depending on language selection. I am searching for the event when user changes language from settings , but I didn't find anything.
Does anybody know whether it is possible to detect this event or not ?
Any kind of help is appreciated. Thanks.
Soluzione
Altri suggerimenti
Observe this notification key: NSCurrentLocaleDidChangeNotification
Declared in NSLocale.h
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow