This project is read-only.


SetCultureCommand should change culture also on CurrentThread


On my opinion SetCultureCommand should change culture also on CurrentThread's CurrentCulture / CurrentUICulture.
Reason: quite often we use libraries of controls that "pick up" such changes and adapt their content according to CurrentThread's culture.
Closed Nov 12, 2012 at 3:31 PM by MrCircuit
fixed in v2.1.2


SeriousM wrote Oct 31, 2012 at 5:29 PM

This could be an option of the command, or another command with a name like "SetAllCulturesCommand".
What would you prefer?

valeriuz wrote Oct 31, 2012 at 8:52 PM

I've seen that there is an IDictionaryEventListener interface... That should do it for the most common scenarios I described above.
Typically most of localizable applications have some kind of "LocalizationManager" that handle culture changes among its "breed" of controls. So, extending such a LocalizationManager with this interface and subscribing to the DictionaryEvent that is raised during the SetCultureCommand.Execute() method should be more than enough. This way a LocalizationManager could change also CurrentThread's CurrentCulture if it considers necessarily.

In conclusion, this issue I raised could be marked as "fixed" on the condition of one documenting such a scenario of notifying a LocalizationManager abou culture changes.

MrCircuit wrote Nov 5, 2012 at 1:07 PM

I'll implement a flag that can be set on the LocalizeDictionary with the default to true.