- Posts: 52
Question Default Calendar
- et3rnal
- Topic Author
- Offline
- New Member
Less
More
10 years 10 months ago #1
by et3rnal
Default Calendar was created by et3rnal
HI guys,
Is there anyway to set the default calender on calendar view "calendar.php" ?
What happening is, I only use "Gregorian" but if anyone uses the website in "Arabic language for example" then the "Hijri" calender will be selected! instead but all the dates stays in Gregorian! even if I set the conversion option to Hijri.
So what I want to keep the Gregorian one the selected one regardless what language the users using.
Thanks
Is there anyway to set the default calender on calendar view "calendar.php" ?
What happening is, I only use "Gregorian" but if anyone uses the website in "Arabic language for example" then the "Hijri" calender will be selected! instead but all the dates stays in Gregorian! even if I set the conversion option to Hijri.
So what I want to keep the Gregorian one the selected one regardless what language the users using.
Thanks
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
10 years 10 months ago #2
by fisharebest
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Replied by fisharebest on topic Default Calendar
Near the beginning of the file calendar.php is the following logic:
As you can see, we guess which calendar to use, based on the current language.
I realise that this logic is a little simplistic - but it generally works well.
You can simply delete the line for 'ar'
Code:
if ($cal.$day.$month.$year=='') {
// No date specified? Use the most likely calendar
switch (WT_LOCALE) {
case 'fa': $cal='@#DJALALI@'; break;
case 'ar': $cal='@#DHIJRI@'; break;
case 'he': $cal='@#DHEBREW@'; break;
default: $cal='@#DGREGORIAN@'; break;
}
}
As you can see, we guess which calendar to use, based on the current language.
I realise that this logic is a little simplistic - but it generally works well.
You can simply delete the line for 'ar'
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- et3rnal
- Topic Author
- Offline
- New Member
Less
More
- Posts: 52
10 years 10 months ago #3
by et3rnal
Replied by et3rnal on topic Default Calendar
Yes very clear indeed, if it shows the converted date would be good but it doesn't.
Thanks heaps
Thanks heaps
Please Log in or Create an account to join the conversation.