Schedule Control Appointment Form Localization
Hi,
Can anybody be so kind to help me out with the issue
that I have with localization of Appointment Form which is part of the Schedule
control? As you can see from the picture shown I would like to localize the
part inside the red square.
The code I suppose to use for that looks like:
'You can override this method to provide customized drop lists.
Public Overridable Sub InitLists()
labelList = New ListObjectList()
labelList.Add(New ListObject(0, "None", Color.White))
labelList.Add(New ListObject(1, "Important", Color.FromArgb(255, 128, 64)))
labelList.Add(New ListObject(2, "Business", Color.FromArgb(86, 152, 233)))
labelList.Add(New ListObject(3, "Personal", Color.FromArgb(57, 210, 53)))
labelList.Add(New ListObject(4, "Vacation", Color.FromArgb(199, 198, 182)))
labelList.Add(New ListObject(5, "Must Attend", Color.FromArgb(255, 128, 0)))
labelList.Add(New ListObject(6, "Travel Required", Color.FromArgb(0, 255, 255)))
labelList.Add(New ListObject(7, "Needs Preparation", Color.FromArgb(171, 171, 88)))
labelList.Add(New ListObject(8, "Birthday", Color.FromArgb(186, 117, 255)))
labelList.Add(New ListObject(9, "Anniversary", Color.FromArgb(255, 128, 64)))
labelList.Add(New ListObject(10, "Phone Call", Color.FromArgb(255, 128, 64)))
markerList = New ListObjectList()
markerList.Add(New ListObject(0, "Free", Color.FromArgb(50, Color.RoyalBlue)))
markerList.Add(New ListObject(1, "Tentative", Color.FromArgb(255, 206, 206)))
markerList.Add(New ListObject(2, "Busy", Color.FromArgb(0, 0, 242)))
markerList.Add(New ListObject(3, "Out of Office", Color.FromArgb(128, 0, 64)))
reminderList = New ListObjectList()
reminderList.Add(New ListObject(0, "0 minutes", Color.White))
reminderList.Add(New ListObject(1, "5 minutes", Color.White))
reminderList.Add(New ListObject(2, "10 minutes", Color.White))
reminderList.Add(New ListObject(3, "15 minutes", Color.White))
reminderList.Add(New ListObject(4, "30 minutes", Color.White))
reminderList.Add(New ListObject(5, "1 hour", Color.White))
reminderList.Add(New ListObject(6, "2 hours", Color.White))
reminderList.Add(New ListObject(7, "3 hours", Color.White))
reminderList.Add(New ListObject(8, "4 hours", Color.White))
Me.locationList = New ListObjectList()
locationList.Add(New ListObject(0, "", Color.White))
locationList.Add(New ListObject(1, "RoomB", Color.White))
locationList.Add(New ListObject(2, "RoomC", Color.White))
locationList.Add(New ListObject(3, "RoomD", Color.White))
locationList.Add(New ListObject(4, "RoomE", Color.White))
End SubBut I don't know how to actually implement it. Can
anybody help me with the implementation? Maybe you have some example (visual
basic) that may help me out?
Thanks!
SIGN IN To post a reply.
7 Replies
AA
Arulraj A
Syncfusion Team
November 26, 2018 12:37 PM UTC
Hi Marinko,
Thanks for using Syncfusion products.
You can localize the label text of the appointments by customizing Initlists and GetLabels methods of ScheduleDataProvider class. In InitLists method, required number of labels can be added with different colors with localized text.
VB
|
Public Overrides Sub InitLists()
MyBase.InitLists()
_list = New ListObjectList From {
New ListObject(0, Resource1.RecurrenceLabelNone, Color.Black),
New ListObject(1, Resource1.RecurrenceLabelImportant, Color.Red),
… |
Please let us know if you need any further details on this.
Arulraj A
MT
Marinko T
November 26, 2018 04:15 PM UTC
First of all, thank you for your efforts and for all the help you have provided, but the issue is still there. I have tried to implement suggested but as a result, nothing changes. I have added the code at the end of the Form1 where the Schedule Control is. I don't get any error but nothing in the Form changes.

Maybe I should add something more. I don't have a clue...If you have an idea how to resolve this I would be grateful.
Never the less, have a good one today!
Thanks,
AA
Arulraj A
Syncfusion Team
November 27, 2018 04:39 AM UTC
Hi Marinko,
Thanks for your update.
In the provided sample, we have created the custom class using ArrayListDataProvider and changed the text for the labels. You can find the following line of codes in the sample which does this change in the ScheduleControl. Ensue that you have done these code changes in your application in order to reflect the changes.
|
Dim scheduleProvider As ArrayListDataProvider
scheduleProvider = New CustomArrayListDataProvider With {.MasterList = New ArrayListAppointmentList(), .FileName = "default.XML"}
Me.scheduleControl1.DataSource = scheduleProvider |
Let us know whether this helps also if you need any further assistance on this.
Regards,
Arulraj A
MT
Marinko T
November 28, 2018 08:43 AM UTC
Hi Arulraj,

I am really grateful for your help and I have done all as suggested and it was working when I implement the code in a way you have done it:
But the problem is that I cannot load the XML file which contains appointment info. So, when I try to implement this::
I can load the XML file but the change in a dropdown localized menu has gone away. Is there a way to implement the two to work together?
Thanks for your help,
AA
Arulraj A
Syncfusion Team
November 28, 2018 10:07 AM UTC
Hi Marinko,
Thanks for the update.
To save/load, you are in need to customize the Save/Load methods too in your custom class. We have modified the sample to get this done by adding a new method LoadCustomXml and overriding the SaveXML method. The “default.xml” file is generated with new class name
|
Public Shared Function LoadCustomXml(ByVal filename As String) As CustomArrayListDataProvider
Dim customArrayListDataProvider As CustomArrayListDataProvider = Nothing
Dim s As Stream = File.OpenRead(filename)
Try
Dim serializer As New XmlSerializer(GetType(CustomArrayListDataProvider))
customArrayListDataProvider = TryCast(serializer.Deserialize(s), CustomArrayListDataProvider)
If customArrayListDataProvider IsNot Nothing Then
customArrayListDataProvider.MasterList = New ArrayListAppointmentList()
If customArrayListDataProvider.MasterListArray IsNot Nothing AndAlso customArrayListDataProvider.MasterListArray.GetLength(0) > 0 Then
customArrayListDataProvider.MasterList.GetList().AddRange(customArrayListDataProvider.MasterListArray)
End If
If customArrayListDataProvider.RecurringListArray IsNot Nothing AndAlso customArrayListDataProvider.RecurringListArray.GetLength(0) > 0 Then
CType(customArrayListDataProvider.RecurringList, ArrayListAppointmentList).GetList().AddRange(customArrayListDataProvider.RecurringListArray)
End If
End If
Finally
s.Close()
End Try
Return customArrayListDataProvider
End Function
Public Overrides Sub SaveXML(ByVal fileName As String)
PreprocessListsBeforeWrite()
Dim serializer As New XmlSerializer(GetType(CustomArrayListDataProvider))
Dim writer As TextWriter = New StreamWriter(fileName)
serializer.Serialize(writer, Me)
writer.Close()
End Sub |
Sample: http://www.syncfusion.com/downloads/support/forum/141111/ze/ScheduleCustomSerializer798708332
Please let us know if you need any further details on this.
Arulraj A
MT
Marinko T
November 28, 2018 03:35 PM UTC
Hi Arulraj,

Thank you for all your help and quick responses. You have helped me a lot!
I have a question regarding the use of XML file when I operate with a big data quantity. Is it reliable to use XML file or maybe is MS Access database better choice? If that is the case, do I get a conflict with localization like in previous cases with XML data file?
Thanks,
Also, this is not a big issue but after all changes in the code this highlighted part stays untranslated:
AA
Arulraj A
Syncfusion Team
November 29, 2018 09:10 AM UTC
Hi Marinko
Thanks for the update.
|
I have a question regarding the use of XML file when I operate with a big data quantity. Is it reliable to use XML file or maybe is MS Access database better choice? If that is the case, do I get a conflict with localization like in previous cases with XML data file? |
No, you will not get the conflict. You will get the localized text when you use the CustomArrayListDataProvider to save in database. You need to write your own logics to save/load from database
Refer the following Forum to work with database and ScheduleControl,
|
|
After all changes in the code this highlighted part stays untranslated |
At present the Start and End time cannot be localized. We have logged an improvement feature to implement the ability to localize the remaining text in the Schedule Appointment Form and it will be available in any of our upcoming releases. |
Let us know whether this helps also if you need any further assistance on this.
Arulraj A
SIGN IN To post a reply.
- 7 Replies
- 2 Participants
-
MT Marinko T
- Nov 24, 2018 01:21 PM UTC
- Nov 29, 2018 09:10 AM UTC