I am developing windows application which supports two language Arabic and English. I want to change the UI (Labels) of the forms at run time. Which ever language selected by user initially forms should be displayed in that language. For this I have set following key
If user selects English
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-GB");"
If user selects Arabic
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-Ar");
This works fine when I run the application in visual studio. All the forms comes according to currently selected UI culture.
But after installing the MSI of this application on machine it is not showing the form's label values according to CurrentUICulture Resource file. It is always showing label's in English only even though selected language is Arabic.
I found the solution of this query by doing following steps. - Actually while creating the installer of the application it maps the resource dll folder so only addition of the "project.resources.dll" in the deployment project is not enough. - Add a folder (named same as a folder name which contains resource.dll under bin->dubug) under the Application folder then add the "project.resources.dll" under it. - it will solves the issue->all the labels will come in arabic if the selected language is arabic