Tell us what you are trying to do?
I would like to display the title, date and excerpt of posts in a view in french language.
My site is only in french language. It is not a multi-lingual site. There is not any translation plugin.
I would like to display date with month in plain text, eg: 21 mars 2021.
In general settings, language is set to French (Français).
I can't figure out how to output post date in french.
Hello. Thank you for contacting the Toolset support.
It seems you need to localize the date in your desired format using the WordPress function: date_i18n().
And to do that we need to add custom shortcode.
If you can share temporary admin access details I'm happy to add that shortcode and share the solution with you.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
I've added the following shortcode to "Custom Code" shortcode section:
=> hidden link
add_shortcode('wpv-show-date', 'func_display_locale_date' );
function func_display_locale_date() {
global $post;
return date_i18n ('d F Y',strtotime($post->post_date));
}
And then within your archive's loop section, I've added the "Fields and Text" block and added the called the above shortcode as given under:
[wpv-show-date]
I can see now date is translated: hidden link
you should edit your archive and remove the single field block that displays the date in English.