Help Desk

Weekly Widget Translation: Week Day & Date

  • Posts: 4 Topics: 2
    | Permalink

    Hi there,

    We are using The Events Calendar on a German website and were wondering if you could help with a translation issue regarding the weekly widget. We managed to get the plugin working great for most parts of the site, but the weekly widget does not seem to take the changed settings for date formats and language. It still shows the English format for day of the week and date (e.g. Thu 6th). We are using a temporary workaround for this right now by suppressing all non-numeric characters associated with the date, for example. Is there a way to have the day of the week and date properly format and translate into German?

    You can find an example on our site here: http://efeu.org/wk220

    Thanks,
    Bernhard

    Posts: 17439 Topics: 14 Answers: 973
    | Permalink

    Morning, Bernhard!

    I’m guessing it’s week view itself you are interested in here (as opposed to the “This Week” widget).

    If you visit Events → Settings → Display you should be able to modify the format via the Week Day Format setting.

    Does that help?

    Posts: 4 Topics: 2
    | Permalink

    Barry,

    Thanks for the reply! We have adjusted all the settings to the format we need, but unfortunately it does not seem to carry through to the “This Week” widget (it is the widget we are using on the site, not just the weekly view). See the following link for an example:

    http://efeu.org/wk220

    Right now we are suppressing all the non-numeric characters next to the date manually in the code, but that does not seem to be a sustainable solution (I am guessing it may also limit our ability to update the plugin).

    Best,
    Bernhard

    Posts: 17439 Topics: 14 Answers: 973
    | Permalink

    Are you comfortable with the idea of setting up snippets in either a custom plugin or your theme’s functions.php file? If so, these samples could help:

    add_filter( 'tribe_events_this_week_date_format', function() {
        return 'j';
    } );
    
    add_filter( 'tribe_events_this_week_day_format', function() {
        return 'D ';
    } );
    

    You would need to adjust the returned format using the conventions described here, though.

    Does that help at all?

    Posts: 4 Topics: 2
    | Permalink

    Thanks, Barry! I think we were looking for something just like this. Will look into it a bit more, but should be able to make this work. Thank you for your help!

    Best,
    Bernhard

    Posts: 17439 Topics: 14 Answers: 973
    | Permalink

    No problem, happy to help (and let me know if you’re still blocked after you’ve had a chance to play with it) 🙂

    Posts: 4
    | Permalink

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

    | Permalink

The topic ‘Weekly Widget Translation: Week Day & Date’ is closed to new replies.