Translation issue Events Calendar Pro 3.0.5

Home Forums Calendar Products Events Calendar PRO Translation issue Events Calendar Pro 3.0.5

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #67213
    dpaiha
    Participant

    The formatting of dates and times for day-view is currently hard-coded inside events-calendar-pro.php for the day-view (and map and photo, but we don’t use them currently). I’ve added the two functions, that I’ve changed to match german styling.
    function maybeAddEventTitle

    case ‘day’:
    /* changed formating from l, F jS Y to j. M Y */
    $new_title = __( ‘Events for’, ‘tribe-events-calendar-pro’ ) . ‘ ‘ .Date(“j. M Y”, strtotime($wp_query->get(‘start_date’))). ‘ ‘; /* . $sep . ‘ ‘ */
    break;

    function reset_page_title( $content ){

    // day view title
    if( tribe_is_day() ) {
    /* changed formating from l, F jS Y to j. M Y */
    $reset_title = __( ‘Events for’, ‘tribe-events-calendar-pro’ ) . ‘ ‘ .Date(“j. M Y”, strtotime($wp_query->get(‘start_date’)));
    }

    #67509
    Barry
    Member

    Hi dpaiha,

    We never recommend editing core code unless absolutely necessary (as your changes will be lost following a plugin update). Instead, in this case, you could use the tribe_events_pro_add_title filter which exists for this purpose.

    Hope that helps!

    #67648
    dpaiha
    Participant

    I’ve done it through filters inside the function.php
    add_filter(‘tribe_events_add_title’, ‘my_maybeAddEventTitle’ ,13,3);
    add_filter( ‘tribe_get_events_title’, ‘my_reset_page_title’,13,1);

    #67676
    Barry
    Member

    Excellent – sounds like you are all set and so I will go ahead and close this thread. If there’s anything else please do feel free to create new threads as needed 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Translation issue Events Calendar Pro 3.0.5’ is closed to new replies.