• Just to let the creators of this excellent plugin know that in non-English languages, dates generally don’t include “th” “st” or “nd” after the number of the day.

    So, if you install the plugin on WP in French for example, on the page displaying the list of reservations, the select menu for the date shows “lundi, mai 24th” where it should ideally be “Lundi 24 mai” with a capital, no comma and no “th”.

    By the way, if you have a way to easily fix this, let me know.

    Thanks

    • This topic was modified 2 years, 6 months ago by ant123.
    • This topic was modified 2 years, 6 months ago by ant123.
    • This topic was modified 2 years, 6 months ago by ant123.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support jaysupport

    (@jaysupport)

    Hi ant,

    Thank you for noticing that!

    At the moment, that’s actually hard coded, which is why it’s not using the date format you can specify in our plugin settings. We’ll change this so that it does use that setting.

    In the meantime, if you wanted to change it, the line of code that generates this is found in the template-functions.php file in the includes folder. Search for the following line:

    <option value='<?php echo date_i18n('Y-m-d', $timestamp); ?>' <?php echo ( date_i18n('Y-m-d', $timestamp) == $args['date'] ? 'selected="selected"' : '' ); ?> ><?php echo date_i18n('l, F jS', $timestamp); ?></option>

    The format for the date you see is the ‘l, F jS’ part. And the “S” is what is adding the “th”, etc. So you could just remove the S or change the whole format if you’d like.

    Thanks again!

    Thread Starter ant123

    (@ant123)

    Thanks!
    That did the trick.

    Thread Starter ant123

    (@ant123)

    I also changed the hour format (I doubt any restaurant is interested to see the seconds of the booking time) and I centered the text in the cells of the table.

    These 2 improvements plus the date format we talked about earlier would probably be welcome by most users.

    Thanks again for such an excellent plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Non-English date format’ is closed to new replies.