I need an assignment dialog that is similar to what is built in; some fields will stay and others will be replaced. Recurrence is needed. It seems that I can either create my own dialog or customize the built in dialog. I'm not yet sure which way to go, but the second option seems like less work.
All links I have seen on customizing the built in dialog don't work. Can someone point me to information on doing this?
If I create my own dialogs, will I be able to use the appointment prompting? Or will I need to handle that as well?
I have a related question which may also affect my decision on which method to use. Can the built in appointment and recurrence dialogs be translated? Will they respond to change in culture and language in the operating system?
Thanks!
Hello Rose,
Thank you for explaining the situation.
You can translate the days and months by using code similar to the following.
private void customizeDaysMonths() { ultraCalendarInfo1.DaysOfWeek[System.DayOfWeek.Monday].LongDescription = "月曜日"; ultraCalendarInfo1.DaysOfWeek[System.DayOfWeek.Monday].ShortDescription = "月"; ultraCalendarInfo1.MonthsOfYear[6].LongDescription = "6 月"; ultraCalendarInfo1.MonthsOfYear[Infragistics.Win. UltraWinSchedule.YearMonthEnum.June].ShortDescription = "6 月";
}
You can set both the LongDescription or ShortDescription of the day or month name. Either the enumeration or the index can be used to set the month name.
I tried this with an UltraMonthViewSingle whose CalendarInfo property was set to ultraCalendarInfo1. I attached a screenshot of what it looked like after calling customizeDaysMonths() in the Form1 constructor.
I hope that this is helpful. Please let me know if there's anything else.
Elizabeth Albert
Localization Engineer
Hi Elizabeth,
The scenario is that PC has a culture that is specified and the application is not allowed to change it. However, the user can change the language. There is only one tranlsateion per language; there are no current language/culture combinations. When the user chooses a new language, all of the text in the application should change to the new language. The desire is that the days and moths change at that time.
Jsut to complete hte picture, the way I handled other Infragistic translation, is to keep a copy in the application and then assign the application's string to the Infragistics' string using
Infragistics.Win.UltraWinSchedule.
Resources.Customizer.SetCustomizedString().
So, is there a way to translate the days and months without changing the culture?
Thanks,
Rose
Hi Rose,
Could you please clarify the scenario? Are the names of the days and months supposed to change with the user's language selection?
In that case, you could update the CurrentCulture when the user makes the language selection. Set a variable (selectedLanguage) to the user's language selection locale code. Then add the following code to the event that fires when the language selection is changed (for example, OnValueChanged for an UltraCombo).
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(selectedLanguage);
The form might have to be redrawn at that point.
That would be great if the language were based on the culture. Also, there is a requirement to update the language while the app is running. So, I had to duplicate the strings in the app and use the resource customizer to handle these. What you described won't work for me. Sorry.
I just tested this out with an UltraMonthViewSingle. When I ran the project the first time, I got English day and month names, because my computer's locale is English. Then I changed the CurrentCulture of the thread by adding the following line to the Form1() method.
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("fr-FR");
This resulted in French day and month names, as shown in the attached screenshot.
In summary, the names of the days and months should come from Windows, based on the CurrentCulture setting. There is no need to translate them in a resource file.
Please let me know if you have any other questions!
Elizabeth AlbertLocalization Engineer