Localization problem with Resource files
-
I am having problems with the use of resource files (holding strings) with Visual Studio 2005. To abstract the problem, I have written a demo application. I am working on device applications for PPC2003. I got one C# Solution with two projects. The following shows how the files are organised (and the blue text is some comments to understand it better): LocalizationAppDemoAll2 (Solution) _____LocalizationAppDemoAll2 (In bold, my startup project) __________Properties (folder) _______________... __________References (folder) _______________LocalizationAppDemoAll2Presentation (reference to dll of the other project) _______________... __________it (folder) _______________LocalizationAppDemoAll2Presentation.resources.dll (added as a shortcut link) __________Program.cs (containing the Main method) _____LocalizationAppDemoAll2Presentation (the second project within the solution) __________References (folder) _______________... __________Resources (folder) _______________CodeText.it.resx _______________CodeText.resx __________Form1.cs __________FormHandler.cs ---------------------------------------- I have changed my regional settings on the PDA device to Italy, and running the application. The application is supposed to read all the strings from the resource file CodeText and populates it in a list box (or combo box). However, the problem is that when running the application, it is only using the english version (i.e. CodeText.resx) file and not the italian resource file (i.e. CodeText.it.resx) despite the regional settings changed to Italy. I think it cannot find or reads the correct dlls. Any help please? It's urgent. Thanks Ashvin Gunga Ashvin Gunga
-
I am having problems with the use of resource files (holding strings) with Visual Studio 2005. To abstract the problem, I have written a demo application. I am working on device applications for PPC2003. I got one C# Solution with two projects. The following shows how the files are organised (and the blue text is some comments to understand it better): LocalizationAppDemoAll2 (Solution) _____LocalizationAppDemoAll2 (In bold, my startup project) __________Properties (folder) _______________... __________References (folder) _______________LocalizationAppDemoAll2Presentation (reference to dll of the other project) _______________... __________it (folder) _______________LocalizationAppDemoAll2Presentation.resources.dll (added as a shortcut link) __________Program.cs (containing the Main method) _____LocalizationAppDemoAll2Presentation (the second project within the solution) __________References (folder) _______________... __________Resources (folder) _______________CodeText.it.resx _______________CodeText.resx __________Form1.cs __________FormHandler.cs ---------------------------------------- I have changed my regional settings on the PDA device to Italy, and running the application. The application is supposed to read all the strings from the resource file CodeText and populates it in a list box (or combo box). However, the problem is that when running the application, it is only using the english version (i.e. CodeText.resx) file and not the italian resource file (i.e. CodeText.it.resx) despite the regional settings changed to Italy. I think it cannot find or reads the correct dlls. Any help please? It's urgent. Thanks Ashvin Gunga Ashvin Gunga
-
use following code for explicitly loading resx File
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("it");
Thanks Sam. I figured out the problem. The code was fine. It's one of the properties of the dll link that I didnt set correctly. Now it's working. Cheers