For example, my asp.net application has a user which has an account number, name, address and a culture.
I know exceptions should rarely be shown to the user.
But lets say I do want to use this framework exception message localized, is it possible?
something like
catch(Exception ex)
{
ex.ShowLocalizedMessage(myCurrentUser.CurrentCulture)
}
Framework exceptions will always be localized using the current thread’s CurrentUICulture. If you change the property on the thread, the exception messages will follow. (This is usually seen as more of a problem than a benefit, but ymmv…)