If the user changes the selected language in the Android settings, how can I detect that change in my App and update the content to use / show the correct content from the Resources file?
Other apps, such as Settings itself, GMail, etc update as soon as the language is changed in Settings - and the app is brought back to the foreground. My app has to be closed and reopened for it to detect the new language setting.
I currently do this in the constructor of App in the shared project:
Thread.CurrentThread.CurrentUICulture = CultureInfo.InstalledUICulture;
I tried adding code in "OnConfigurationChanged" of the Android app (in MainActivity.cs), I also added both "ConfigChanges.Locale" and "ConfigChanges.LayoutDirection" to "[Activity]". The "OnConfigurationChanged" method is called but I don't what to do in order to make my App refresh with the newly selected language.
Please Note: I am not changing the language in my own app, instead I want to react to when a user changes the language in the Android device settings themselves.
Also, I am assuming the same does not apply to iOS because it appears as though an iOS device will restart if the language is changed?