Would it be possible to patch a system to allow the design area to output the date in other languages?
Specifically I want to display the date on the home page in English and Maori.
I suspect this could be done by creating a custom Design Area element and then echoing a custom function into the design instead of the call to date().
(I know I could replace the time with JS on the client, but I'd rather stay server side if I can).
Date display in design areas
rhulse
(Rhulse)
#1
Avi_Miller
(Avi Miller)
#2
[quote]Would it be possible to patch a system to allow the design area to output the date in other languages?
I suspect this could be done by creating a custom Design Area element and then echoing a custom function into the design instead of the call to date().[/quote]
Yeah, you could create a custom version of the datetime design area to do this. How would you output the date in Maori in PHP normally?
rhulse
(Rhulse)
#3
I thought so.
I'd normally just have a translate function for the day and month, or alternatively one that takes a UNIX timestamp and provides the formated date in one step.
Could the custom version live in a package, or would it have to be in the core?
R
gsherwood
(Greg Sherwood)
#4
It can be in a package. The search package adds the Search Box design area, for example.