I need to show datetime events in italian language.
My setlocale is correct (it_IT) but I can see this: Friday April 11th, 2014 8:00
And I need to see: Venerdì 11 aprile 2014 8:00
Our policy, like that of many companies, is not to comment on the timetable of work in progress. I can tell you this is complicated fix because it affects how the events are not only displayed but entered into the event editor.
In the meantime, there are other ways of displaying the primary event date in the templates that you can use. This is one way:
In your child theme’s functions.php file you add:
function my_event_date_and_time() {
global $post;
if ( isset( $post->EE_Event ) && $post->EE_Event instanceof EE_Event ) {
echo $post->EE_Event->primary_datetime()->start_date_and_time();
}
}
This makes a new template tag you can use to display an event time in its place with:
Hi Josh,
I put function my_event_date_and_time() in my template functions.php
Then I called my_event_date_and_time(); inside my custom content-espresso_events.php.
It doesn’t work 🙁
Do any of your changes in content-espresso_events.php work? It may be that it’s not loading. Another thing you can try is adding the function directly inside the template. The theme’s functions.php file may be getting interrupted when it loads its functions.
Viewing 5 reply threads
The support post ‘Datetime localization Ee4’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.