[SOLVED]Full day name in forecast days
Resolved topics about GK Weather module, the best weather extension for Joomla.
Rate this topic:
- GK User
- Sat Apr 03, 2010 12:04 pm
Hi guys,
On GK weather I want to display the full name day(something like %A from php strtime fuction). From where I can change the current display to the one I desire?
I've search it in all the files but I didn't find anything related to php strtime function. Or you are parsing this data from Google weather?
Ex: instead of "Sa"/"Sat" I want "Saturday"
Regards,
Krebs
On GK weather I want to display the full name day(something like %A from php strtime fuction). From where I can change the current display to the one I desire?
I've search it in all the files but I didn't find anything related to php strtime function. Or you are parsing this data from Google weather?
Ex: instead of "Sa"/"Sat" I want "Saturday"
Regards,
Krebs
-
- Fresh Boarder
- teitbite
- Tue Apr 06, 2010 12:37 pm
Hi
It's taken from google. So if You want to have full names please make it simple by replacying the shorts to full by using:
It's just an example. But I think You will know what I mean.
It's taken from google. So if You want to have full names please make it simple by replacying the shorts to full by using:
- Code: Select all
"day" => str_replace( array( 'Su' ), array( 'Sunday' ), $node->day_of_week[0]->attributes('data') ),
It's just an example. But I think You will know what I mean.
-
- Moderator
- GK User
- Tue Apr 06, 2010 7:37 pm
teitbite wrote:
I don't -kidding
Thank you again Teitbite for your support - excellent as always
If anyone (in the future) would like to implement this change.
1. open helper.php file and go at line 245
2. replace
with
Please note that the above code is designated for the romanian week days.
Future information(about str_replace function) - http://php.net/manual/en/function.str-replace.php - if needed.
Regards,
Krebs
Hi
It's taken from google. So if You want to have full names please make it simple by replacying the shorts to full by using:
- Code: Select all
"day" => str_replace( array( 'Su' ), array( 'Sunday' ), $node->day_of_week[0]->attributes('data') ),
It's just an example. But I think You will know what I mean.
I don't -kidding
Thank you again Teitbite for your support - excellent as always
If anyone (in the future) would like to implement this change.
1. open helper.php file and go at line 245
2. replace
- Code: Select all
"day" => $node->day_of_week[0]->attributes('data'),
with
- Code: Select all
"day" => str_replace( array( 'Lu','Ma','Mi','Jo','Vi','Sâ','Du'), array( 'Luni','Marţi','Miercuri','Joi','Vineri','Sâmbătă','Duminică'), $node->day_of_week[0]->attributes('data') ),
Please note that the above code is designated for the romanian week days.
Future information(about str_replace function) - http://php.net/manual/en/function.str-replace.php - if needed.
Regards,
Krebs
-
- Fresh Boarder
3 posts
• Page 1 of 1