Define locale for publish_date

The below code is working. Altough, how could I edit it, to use the date all_local so that the date appears in the user’s language?

<?php echo tangible_template ('<Field publish_date date_format="j F Y" />'); ?>

Kindly,

Hi Stanley,

In the newest plugin version, I added a way to get the current user’s locale (the Language setting in profile edit screen):

<User locale />

I confirmed that the locale format (e.g., en_US) is the same as what’s expected by the date format function. So it can be passed like this:

<Field publish_date date_format="j F Y" locale="{User locale}" />

Thank you so much Eliot.
Sincerly, very much appreciated.

1 Like