tags:

views:

90

answers:

1

I have a Windows.Forms application and I change the resources at runtime with this code:

Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = new CultureInfo("it-IT");

What happens is that new forms appear correctly with the new culture, while Properties.Resources.* strings always appear with the neutral culture (even if Properties.Resources.Culture appears correctly set to "it-IT").

How can I make my program reload Properties.Resources.* strings after chaning the culture?

+1  A: 

This should happen automatically. Make sure that you have created the localized resources correctly:

  1. Neutral culture goes into <filename>.resx
  2. Italian culture goes into <filename>.it-IT.rex (or <filename>.it.resx)
Fredrik Mörk
I have a file called Resources.it.resx in the main folder of the application and it's added to the project as "Embedded resource". Should it go somewhere else?
Enrico Detoma
Is it located in the same place as Resources.resx?
Fredrik Mörk
Thank you, it was in the wrong place: it should have been in the Properties subdir instead of in the main dir.
Enrico Detoma