Translate Widget Mini Calendar Day Name

Home Forums Calendar Products Events Calendar PRO Translate Widget Mini Calendar Day Name

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #62913
    sambellerose
    Participant

    I looked inside the .po files and I didn’t find the place where it was written “MON”, “TUE”, “THU”, etc… for each day of the week of the plugin’s widget feature. I need to translate those in an other language.

    Thanks !

    #62914
    Barry
    Member

    Hi sambellerose, as far as I know the days of the week and month names are translated by the WordPress core (The Events Calendar simply uses wp_locale to handle this) … does that help at all?

    #62936
    sambellerose
    Participant

    Hi Barry, thanks for your tip ! Any idea where it could be located in the WordPress Core ? I tried to change the file locale.php but it didn’t worked at all.

    #62942
    Barry
    Member

    You’d need to set WordPress up to run with the appropriate language files in place: https://codex.wordpress.org/WordPress_in_Your_Language

    Hopefully that will get you on track here šŸ™‚

    #62946
    sambellerose
    Participant

    I’ll take a look thanks a lot !

    #62976
    Barry
    Member

    No problem at all, let us know if you hit any other roadblocks.

    #63780
    dimitrilongo
    Participant

    hello, I have the same issue, but the 3 letters day are well translated in worpress, but still in english in the calendar widget

    #63783
    dimitrilongo
    Participant

    As you can see the 3 letters day name are well translated in the calendar
    http://imgh.us/event-calendar-widget.png

    but bellow in the list of the day selected, it appears still in english (THU 21)
    Strange ?

    Thanks for advices
    Dimitri

    #63785
    dimitrilongo
    Participant

    in /wp-content/plugins/events-calendar-pro/views/widgets/mini-calendar/single-event.php

    line 29

    class=”list-dayname”>
    date(‘D’,$postdate) are short english day name but in grid.php there is a var :
    $days_of_week = tribe_events_get_days_of_week(‘short’);
    this one is well translated

    Hope that can help investigation

    #63792
    Barry
    Member

    Excellent catch Dimitri – you’re absolutely right. Please accept our apologies for the inconvenience (it sounds like you hit on a workaround there which may also be useful for others) and we’ll be sure to get this fixed in one of our maintenance releases šŸ™‚

    #66564
    elokron
    Participant

    If you add in Line 1 of
    widgets\mini-calendar\single-event.php and change date( ‘D’, $postDate ) in Line 31 to strftime(“%a”,$postDate ) it will display the language correctly.

    #66565
    elokron
    Participant

    If you add setlocale(LC_TIME, get_locale()); in Line 3 of
    widgets\mini-calendar\single-event.php and change date( ā€˜D’, $postDate ) in Line 31 to strftime(ā€œ%aā€,$postDate ) it will display the language correctly (Sorry for doublepost).

    #66570
    Barry
    Member

    Great – sounds like everyone is good here and has a workaround they’re happy with … and we should hopefully get things fixed up in a forthcoming maintenance release, too. In light of which I’ll go ahead and close this thread – if there’s anything else please don’t hesitate to create new threads as required.

    Thanks!

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Translate Widget Mini Calendar Day Name’ is closed to new replies.