I'd like an option, to change the language in C#, Visual Studio. I have the Form1.resx
which holds the Default language items. I also have Form1.en.resx
, and Form1.en-US.resx
, which holds the english translations. (Of course I only need one of them, but while testing I created both.)
When I run the application, the Default language captions appear. But the following code should overwrite this:
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US", false);
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", false);
When I check the CurrentCulture
or CurrentUICulture
values, they are indeed changed to "en-US", after this code, but the same resx file is used, so the captions won't change. So for excample label1.Text
stays the same though it has a different value in Form1.en-US.resx
.
How should I solve this problem?
Additional information: I use .NET Framework 4.5, and Visual Studio 2012. The project files (really simple project) are avaible here if you need them: https://dl.dropboxusercontent.com/u/36411041/Multi.zip