|
|
Problems with a localization project |
|
Author |
Message |
New-Bee

|
Posted: .NET Base Class Library, Problems with a localization project |
Top |
Hello all, Following Michele Leroux Bustamante's Globalized Windows Sample, I've worked on a project of mine, a window app, that uses a different project exclusively for storing Strings in different languages. The idea is adding a reference of the localisation project to the main project, and so enjoy the intellisense whenever chosing a String to show on the form- while the String will be chosen according to the Thread.CurrentCulture and the Thread.CurrentUICulture, which could be assigned before calling the Application.Run(form1()) method. This worked perfect when I managed everything from within the solution, the problems started when I've taken the main project as a .DLL and tried using it from a different solution and a different project. In the new project I have added the .DLL as a reference, which worked just fine, but the changing the thread's Culture just doesn't seem to work- in fact, oddly enough whenever I initializes a new thread with the main() method of my form1 project, set the CurrentCulture and CurrentUICulture and call the thread.Start() method, I do get my form but all the labels and Strings are those of my computer culture and not the one I have set, while the days names I have on my form are displayed according to the culture I have set!! (which is because I use the following code:
string day = CultureInfo.CurrentCulture.DateTimeFormat.GetDayName(DateTimePicker1.Value.DayOfWeek); GroupBox1.Text = Languages.Strings.DISK + " " + (1) + ": " + day;
(when Languages is the name of the localisation project, and Strings is the resource file that I used.)
Any ideas
.NET Development22
|
|
|
|
 |
New-Bee

|
Posted: .NET Base Class Library, Problems with a localization project |
Top |
I'll try to rephrase my question: Is it possible to add a reference to a project that contains already a reference to another project that serves as a "stocking" project of different Strings in different languages For some reason, whenever I do that I get the following error in the compiler: Error 1 Could not find file 'Microsoft.Windows.CommonLanguageRuntime, Version=2.0.50727.0'.
|
|
|
|
 |
New-Bee

|
Posted: .NET Base Class Library, Problems with a localization project |
Top |
Apparently an EXE with a reference to another DLL cannot be added as a reference to a prjocet. What I've done was adding all the projects to the same solution and then changed the EXE project to a class library in the project's properties.
|
|
|
|
 |
|
|