1- i designed application which has two interfaces (english, arabic), the user can choose the UI language at runtime, and the change will be seen after application restarted. i store the selected langauge in app.config.
2- from the form constructor i change the CurrentUICulture to the selected lang by this code:
Public.ArabicView = UmAlQuraCalender.Properties.Settings.Default.ArabicView;
if (Public.ArabicView == true)
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ar-SA");
else
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
3- the application work without problem in my development machine.
4- when i test the application in another machine, only one user interface is working (english), if i check the other language and restart the application nothing happen the interface remain english although the arabic local is installed.
i use two radio button: one for arabic and the other for english, and inside the click event i change CurrentUICulture to the selected language inside this code:
private void rbArabic_Click(object sender, EventArgs e)
{
Public.ArabicView = rbArabic.Checked;
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ar-SA");
UmAlQuraCalender.Properties.Settings开发者_如何学C.Default.ArabicView = Public.ArabicView;
UmAlQuraCalender.Properties.Settings.Default.Save();
MessageBox.Show("UI Language will be changed after application resart");
}
private void rbEnglish_Click(object sender, EventArgs e)
{
Public.ArabicView = rbArabic.Checked;
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
UmAlQuraCalender.Properties.Settings.Default.ArabicView = Public.ArabicView;
UmAlQuraCalender.Properties.Settings.Default.Save();
MessageBox.Show("UI Language will be changed after application resart");
}
5- also how i can debug (trace the source code) in the test machine to figure out the problem?
if any one can help me i will be thankful.
Why can't you use VS to debug on your test machine? Use Remote Debugger tools if test machine doesn't have VS installed.
Another alternative is to use Reflector. Reflector Pro will allow you to step through your code when you don't have source code access.
thanks my friend for your help
i installed VS in the test machine and i discovered that i forget to include the localized DLL which VS Created in the debug directory.
when i included this directory which has the localized DLL for arabic language the problem was solved.
thanks for the every one reply to my question
精彩评论