This is a migrated thread and some comments may be shown as answers.

Problem to change culture to persian

11 Answers 618 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Hamed Vaziri
Top achievements
Rank 1
Hamed Vaziri asked on 11 Feb 2010, 05:12 PM
Hi
i've tested out your scheduler control whether does it support persian culture or not.
i found this link which help me very much!
almost everyThing is ok except month view. in month view the calendar does not works correctly and also gregorian month name display in the first of the week day that i don't see it.
in attention to that post which this schedule control does not support persian calendar, is there any way to work-around this problem ?
thanks in advance

11 Answers, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 16 Feb 2010, 12:32 PM
Hi Hamed Vaziri,

I have successfully changed the culture of RadScheduler for Winforms to Persian with the latest version of our controls:

           CultureInfo info = new CultureInfo("fa-Ir");
            this.radScheduler.Culture = info;

Could you please try the above code and if there's a problem, please give us more detailed explanation about this issue?

I am looking forward to your reply.

All the best,
Boyko Markov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Sahand
Top achievements
Rank 1
answered on 07 Dec 2011, 12:52 PM
Sorry for bringing up old posts. Just found this topic while trying to integrate Persian calendar with RadScheduler.

MSDN states about PersianCalendar:

"Applications use a PersianCalendar object to calculate dates in the Persian calendar or convert Persian dates to and from Gregorian dates.

Your application should not use a PersianCalendar object as the default calendar for a culture. The default calendar is specified by the CultureInfo.Calendar property and must be one of the calendars returned by the CultureInfo.OptionalCalendars property. Currently, the PersianCalendar class is not an optional calendar for any culture supported by the CultureInfo class and consequently cannot be a default calendar." (Source: http://msdn.microsoft.com/en-us/library/system.globalization.persiancalendar.aspx)

So while there is in fact a PersianCalendar in .NET framework, it cannot be used as a default calendar for any CultureInfo. Not yet at least. As to your proposed solution, the "fa-IR" or "fa" cultures use Georgian calendar, and they also have wrong translations for week days (thanks to Microsoft).

I think the best solution would be to use the default Georgian calendar for all the business logic and storage layer, but to change the presentation layer by converting Georgian dates to Persian using PersianCalendar class and changing every textbox or other control that is displaying dates, day of the week and month names.

0
Ivan Todorov
Telerik team
answered on 08 Dec 2011, 04:07 PM
Hello Sahand,

Thank you for sharing your findings. I believe that they will be useful to other people.

Do not hesitate to contact us if you need any help with our products.

Best wishes,
Ivan Todorov
the Telerik team

Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

0
Raminmjj
Top achievements
Rank 1
answered on 15 Feb 2016, 01:37 PM

Hello.

I create a sample application.

http://www.mediafire.com/download/clvakkg2d6fhk3d/TelerikShamsiDate.zip

every things is OK. but there is a problem in scheduler MontheView and datepicker data entry.

 

scheduler MontheView problems:

1- "this month" hyper link in navigator creates exception.

2- View Monthly labels has just been translated into Persian,but Date values are still Gregorian.

*there is no problem in other Views (timeline, day, week).

 

datepicker problems:

1- user can not type Persian date. for example I typed 1394 (persian year) but value sets 0772 !

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 16 Feb 2016, 08:51 AM
Hello Ramin,

Thank you for writing.
 
There is a known issue in the .NET Framework considering the "fa-IR" culture. Please refer to the following MSDN resource for a solution: https://code.msdn.microsoft.com/Fixing-Persian-Locale-for-6e66e044#content

I hope this information helps. Should you have further questions I would be glad to help.
 
Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Raminmjj
Top achievements
Rank 1
answered on 16 Feb 2016, 02:07 PM

Hello Dess.

Thank you.

RadDatepicker problem was solved, but scheduler MontheView is same as before.

for more details, I attached some image.

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 17 Feb 2016, 02:36 PM
Hello Ramin,

Thank you for writing back. 

The provided screenshots are greatly appreciated. I have logged it in our feedback portal. You can track its progress, subscribe status changes and add your vote/comment to it on the following link - feedback item.

I have also updated your Telerik points.

Currently, the possible solution that I can suggest is to use the CellFormatting event and set the correct text to be displayed: 

private void radScheduler1_CellFormatting(object sender, SchedulerCellEventArgs e)
       {
           MonthCellElement monthCellElement = e.CellElement as MonthCellElement;
           if (monthCellElement != null)
           {
               monthCellElement.Header.Text = monthCellElement.Date.ToString("dd", this.radScheduler1.Culture);
           }
       }

 

I hope this information helps. If you have any additional questions, please let me know.

Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Raminmjj
Top achievements
Rank 1
answered on 29 Oct 2016, 05:22 AM
Hello Dess.

I really appreciate your help in resolving the problem.

there is another problem in MontheView with navigation bar. if click on previous button several times, below exception will be thrown:

"Year, Month, and Day parameters describe an un-representable DateTime."

Thank you.
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 01 Nov 2016, 01:40 PM
Hello Ramin, 

Thank you for writing back. 

Indeed, the initial problem is fixed, but when navigating forwards / backward the mentioned exception is thrown. I have logged it in our feedback portal and I have added a vote for it on your behalf. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

I have also updated your Telerik points.

Currently, due to the specificity of the issue, I am unable to suggest a suitable solution.

I hope this information helps. If you have any additional questions, please let me know.


Regards,
Dess
Telerik by Progress
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
0
mrf
Top achievements
Rank 1
Iron
answered on 20 Jan 2019, 11:44 AM

hi

i need change cultter to persian raddatetimepicker

how i do?

are you update for this component?

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 22 Jan 2019, 10:03 AM
Hello,       
  
The previously referred feature request, "ADD. RadScheduler - support for "fa-IR" culture and PersianCalendar", has already been implemented. It was introduced in R1 2017 version. Feel free to use at least this version or a newer one in order to benefit from the new functionality.

However, if you are experiencing any difficulties with this functionality, feel free to submit a support ticket providing additional information about the precise case. Thus, our support staff will gladly assist you. 
  
I hope this information helps.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Scheduler and Reminder
Asked by
Hamed Vaziri
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
Sahand
Top achievements
Rank 1
Ivan Todorov
Telerik team
Raminmjj
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
mrf
Top achievements
Rank 1
Iron
Share this question
or