When my application run with a specified culture. Don\'t close the application, user changes system\'s culture, ex: change number decimal separator from \".\" to \",\". How
If you want to trach system language changes then you have SystemEvents object which contains UserPreferenceChanged event you can attach to.
Sample:
Microsoft.Win32.SystemEvents.UserPreferenceChanged += new UserPreferenceChangedEventHandler(SystemEvents_UserPreferenceChanged);
If you want to track input language changes (like changes in system try when you choose between languages), then you can use: System.Windows.Forms.InputLanguage.CurrentInputLanguage
Sample:
string inputLanguage = System.Windows.Forms.InputLanguage.CurrentInputLanguage.LayoutName;
You can handle the SystemEvents.UserPreferenceChanged
event:
void SystemEvents.UserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
{
// Regional settings have changed
if (e.Category == UserPreferenceCategory.Locale)
{
...
}
}