Support

Home Forums Events Calendar Add-on Calendar – Event Summary

Calendar – Event Summary

Posted: February 27, 2015 at 8:34 am

Viewing 2 reply threads


Renee deVilliers

February 27, 2015 at 8:34 am

Hi,

In the Event’s Calendar, the Summary that comes up when one hovers over the event in the calendar…. It adds “Event Time:” above the register button.

I’d like to edit that default text to read “Class Time:” instead.

Can you please tell me if that is possible and how to do it.

Thanks


Lorenzo Orlando Caum

  • Support Staff

February 27, 2015 at 11:05 am

Hi Renee, that is wrapped in a translation string:

__('Event Time: ', 'event_espresso')

It can be changed by using a gettext filter. Here is an example:

function ee_change_calendar_verbiage( $translated, $original, $domain ) {
 
    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'Event Time: ' => 'Class Time: ',
        // Add some more strings here
    );
 
    // See if the current string is in the $strings array
    // If so, replace its translation
    if ( isset( $strings[$original] ) ) {
        // This accomplishes the same thing as __()
        // but without running it through the filter again
        $translations = get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
 
add_filter( 'gettext', 'ee_change_calendar_verbiage', 10, 3 );

More information on the gettext filter is available here:

https://eventespresso.com/wiki/how-to-change-wording-with-poedit/#custom-function


Lorenzo


Renee deVilliers

February 27, 2015 at 11:24 am

Ok thanks, that worked for what I needed.

Viewing 2 reply threads

The support post ‘Calendar – Event Summary’ 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.

Event Espresso