Support › General › Datetime field in local language?
I have a query loop and added the following code to give me the Year and the Months of the CPT entry:
<p><?php rwmb_the_value( 'events-datetime_s5ayomw3uvn', ['format' => 'Y'] ) ?> <?php rwmb_the_value( 'events-datetime_s5ayomw3uvn', ['format' => 'F'] )
But now it gives me the Month in English. How to give me the Month in my local language?
It's for an Events Archive Page. That has several events in different months.
Ok I managed it via this code:
$date = get_post_meta( get_the_ID(), 'YOURCUSTOMFIELD', true );
$date = date_i18n( 'F', strtotime( $date ) );