• Resolved s427

    (@s427)


    Hi,

    First of all, thanks for this nice and simple plug-in.
    I’m using it in two places on my site:

    1. in the sidebar, as a widget
    2. on a page, as a custom template (showing a list of future events)

    My site is in French, so obviously I’d like the dates to be displayed in French too (names of months and days). The sidebar widget works fine and prints the dates in French. But the page shows the dates in English.

    Where should I look to correct that?

    The theme I’m using is the “_s” (underscores) starter theme.

    The custom template was mainly based on your “twentytwelve-child/page-event-blog.php” example (in a separate ZIP file). I tweaked it a bit for my needs but I don’t find any reference to language in this code.

    Thanks in advance for your help!

    https://www.ads-software.com/plugins/am-events/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Atte Moisio

    (@moisture)

    Hi,

    Nice to know you like my plugin!

    The date format is set on line 70 and 71 in page-event-blog.php

    am_the_startdate('Y-m-d H:i', 'Start date: ', '<br/>');
    am_the_enddate('Y-m-d H:i', 'End date: ', '<br/>');

    Here you can see the date format defined as 'Y-m-d H:i', just like in the widget, using php date formatting.

    Thread Starter s427

    (@s427)

    Thanks for your quick answer. That’s not what I’m talking about, though.

    The problem is not the date formatting (I figured that out by myself) but the date localization. E.g. having the current day displayed as “Vendredi” (fr) instead of “Friday” (en), or the current month displayed as “Février” instead of “February”.

    The widget does it correctly (names of days and months are displayed in French, like the rest of the site), but the page does not (names are displayed in English). I don’t understand why they behave differently and how to correct that.

    I’ll add that the dates of posts (as displayed by WordPress) are also displayed in French (which is what I want) so I don’t think the problem comes from the theme I’m using. But I don’t know WordPress very well so maybe I’m missing something… (The whole WordPress installation is French too.)

    Plugin Author Atte Moisio

    (@moisture)

    Oh okay, I understand now, should’ve read your post more carefully :). Anyway, I’ll take look into it today and see if I can fix that.

    Plugin Author Atte Moisio

    (@moisture)

    Okay, turned out it was very easy to fix. I just updated the plugin. The localization should now be working.

    Thread Starter s427

    (@s427)

    I confirm that it’s working. Great job! Thanks a lot!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Small issue with dates localization’ is closed to new replies.