3

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.

apaderno
  • 28,547
  • 16
  • 75
  • 90
yalinhahs
  • 121
  • 6
  • You will probably need to post some code. – N_A Nov 17 '11 at 14:56
  • 3
    Does your msi install the satellite assemblies correctly? If your application is called test.exe, you should have a directory en-GB/test.resources.dll and a directory en-Ar/test.resource.dll. – Francis Nov 17 '11 at 15:07
  • When you say selected language is Arabic, how has the language been selected? Through the Regional settings or Language bar or some other means? – Mamta D Nov 17 '11 at 15:53
  • Thanks for giving your valuable suggestion. 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. initially i am doing that only. - Solution : 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 solves the issue for me ->all the labels are now coming in arabic if the selected language is arabic. – yalinhahs Nov 18 '11 at 07:26

1 Answers1

0

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

yalinhahs
  • 121
  • 6