azarbara
  •  azarbara
  • 81.2% (Honored)
  • YAF Lover Topic Starter
2011-11-26T22:11:42Z
hi everybody
i use dnn6.1.1, sql server 2008, iis 7.5, .net freemwork 4
my portal completely localizate to persian and my portal calendar is shamsi ( iranian calendar) but the yaf calendar is gregorian
can i change this calendar to iranian calendar?
Regards


Mathematics site in Persian language: http://rayeshmand.ir 
Sponsor
tha_watcha
2011-11-27T08:45:00Z
There was already a discussion about the Persian Calender a few Month ago

http://forum.yetanotherf...der--shamsi---hijri.aspx 

I added Support for Farsi in the Latest Change Set http://yafnet.codeplex.c...set/changes/b2be8a1d157a 

But it needs to be verified by an persian Developer (Kamyar) if the Date Times are actually correct. And i am not Sure if that breaks some other related calender stuff.

If it works it will be included in YAF 1.96.
UserPostedImage
azarbara
  •  azarbara
  • 81.2% (Honored)
  • YAF Lover Topic Starter
2011-11-27T12:56:09Z
thanks tha
but first link has issue
Mathematics site in Persian language: http://rayeshmand.ir 
tha_watcha
2011-11-27T14:14:07Z
Originally Posted by: azarbara 

thanks tha
but first link has issue



fixed
UserPostedImage
azarbara
  •  azarbara
  • 81.2% (Honored)
  • YAF Lover Topic Starter
2011-11-27T14:31:13Z
i.e the xml file include calendar?
Mathematics site in Persian language: http://rayeshmand.ir 
tha_watcha
2011-11-27T14:39:11Z
Originally Posted by: azarbara 

i.e the xml file include calendar?



No the xml File is the Language File for YAF, for translating YAF in Persian. To Change the Display of the Date Times modifying of the Source Code of YAF is needed.

UserPostedImage
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2011-11-27T23:42:08Z
Error 5 Assembly generation failed -- Referenced assembly 'FarsiLibrary' does not have a strong name YAF.Core

tha_watcha
2011-11-28T09:17:06Z
Originally Posted by: bbobb 

Error 5 Assembly generation failed -- Referenced assembly 'FarsiLibrary' does not have a strong name YAF.Core



Sorry forget the AssemblyKeyFile, should work now.

UserPostedImage
Kamyar
2011-12-15T02:27:55Z
Hey folks. Nice to see yaf improving day by day. Great job and I miss being here a lot. I'm downloading the latest change set to check FarsiCalendar.
I'll send updates here.
If at first you don’t succeed, call it version 1.0
Kamyar
2011-12-15T03:31:39Z
Woah... yaf has become lightning fast. I was really shocked to see the performance improvement.
And nice job with Persian calendar Ingo. I doubted if you're Persian :)
I have encountered 3 issues when testing the solution. All in Yaf.Core/Services/YafDateTime.cs:
Line 103, 167, 284: pass `dateTime` instead of `strDateTime`. In cases when the culture is changed, the `PersianDateConverter` class cannot parse `strDateFormat`.

Also, unfortunately jQuery UI has not implemented Persian calendar correctly (Profile=>Birthday). an Iranian developer has corrected the .js file but it's gonna take some effort to implement it (check if we should use persian calendar in `controls/EditUserProfile.ascx`, then register .js file instead of jquery ui default calendar, then convert back the selected date which is in persian format (e.g. 1390/02/02) to gregorian.
And I'm doubtful if this is in team's plan to take care of jquery ui's mistake. Anyway, I'll be glad to look into it if we plan to try it.
I'll continue looking for issues about persian calendar and will post the updates here.
It's good to be here again. :)


If at first you don’t succeed, call it version 1.0
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2011-12-15T05:56:21Z
Hi,  Kamyar , glad to see you again. :-d

tha_watcha
2011-12-17T21:33:39Z
Originally Posted by: Kamyar 


I have encountered 3 issues when testing the solution. All in Yaf.Core/Services/YafDateTime.cs:
Line 103, 167, 284: pass `dateTime` instead of `strDateTime`. In cases when the culture is changed, the `PersianDateConverter` class cannot parse `strDateFormat`.



This should be fixed now

Originally Posted by: Kamyar 


Also, unfortunately jQuery UI has not implemented Persian calendar correctly (Profile=>Birthday). an Iranian developer has corrected the .js file but it's gonna take some effort to implement it (check if we should use persian calendar in `controls/EditUserProfile.ascx`, then register .js file instead of jquery ui default calendar, then convert back the selected date which is in persian format (e.g. 1390/02/02) to gregorian.
And I'm doubtful if this is in team's plan to take care of jquery ui's mistake. Anyway, I'll be glad to look into it if we plan to try it.
I'll continue looking for issues about persian calendar and will post the updates here.
It's good to be here again. :)



Also that should be fixed now. The Included Modified (not by me) DatePicker can now handle farsi calenders. But please test this if it works as it should be.
UserPostedImage
Kamyar
2011-12-18T18:48:31Z
Great job  tha_watcha ! And super fast. Now I'm pretty sure you have a presian root. 😝

The only problem I encountered is that Farsi Library cannot Convert 1/1/1 to persian date. So line 530 of Contols/EditUserProfile.ascx should check if the user has specified a birthdate or not:
&& this.UserData.Profile.Birthday != DateTime.MinValue

Otherwise, AFAICS it's working like a charm.

Yaf is probably the first international open source project which officially supports Persian (Shamsi/Jalali) calendar thanks to you guys. Just last month I got 3 requests to make yaf support Farsi calendar.
Devs and CMS designers are gonna love you. :cheesy:

One more thing: The Album image selector hangs on loading indicator if the user has no albums. Anyway nice to see more of albums in action. Pretty neat Ingo.

Update: One more place is pages/admin/admin.ascx line 386:
this.BoardStart.Text = this.GetText("ADMIN_ADMIN", "DAYS_AGO").FormatWith(this.Get<YafBoardSettings>().UseFarsiCalender ? PersianDateConverter.ToPersianDate(row["BoardStart"].ToString()) : row["BoardStart"], days);

If at first you don’t succeed, call it version 1.0
azarbara
  •  azarbara
  • 81.2% (Honored)
  • YAF Lover Topic Starter
2011-12-18T18:56:49Z
hi camyar
can i talk farsi to you
i am now online in yahoo
mohammad_azarbara@yahoo.com
Mathematics site in Persian language: http://rayeshmand.ir 
tha_watcha
2011-12-19T12:07:03Z
Originally Posted by: Kamyar 

Great job  tha_watcha ! And super fast. Now I'm pretty sure you have a presian root. 😝

The only problem I encountered is that Farsi Library cannot Convert 1/1/1 to persian date. So line 530 of Contols/EditUserProfile.ascx should check if the user has specified a birthdate or not:

&& this.UserData.Profile.Birthday != DateTime.MinValue

Otherwise, AFAICS it's working like a charm.



fixed

Originally Posted by: Kamyar 


Yaf is probably the first international open source project which officially supports Persian (Shamsi/Jalali) calendar thanks to you guys. Just last month I got 3 requests to make yaf support Farsi calendar.
Devs and CMS designers are gonna love you. :cheesy:



Makes sense because YAF is an International Project :-d, and Unique Features are always nice

Originally Posted by: Kamyar 


One more thing: The Album image selector hangs on loading indicator if the user has no albums. Anyway nice to see more of albums in action. Pretty neat Ingo.



Fixed Button is now hidden

Originally Posted by: Kamyar 


Update: One more place is pages/admin/admin.ascx line 386:

this.BoardStart.Text = this.GetText("ADMIN_ADMIN", "DAYS_AGO").FormatWith(this.Get<YafBoardSettings>().UseFarsiCalender ? PersianDateConverter.ToPersianDate(row["BoardStart"].ToString()) : row["BoardStart"], days);



added, i think there are a few other places where the farsi time needs to be added.

UserPostedImage
Users browsing this topic

    About Us

    The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

    Powered by Resharper Donate with PayPal button

    Project Twitter Updates

    Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved