Home › Forums › General Issues › How to change date format to native language? › Reply To: How to change date format to native language?
Hi James
I’m sure the error lies with me and where I’ve place the code.
Here is the code I’ve placed in the bottom of the ‘functions php’ file and later in the ‘single event php’ file.
<?php
$dateformatstring = “l d F, Y”;
$unixtimestamp = strtotime(get_field(‘concert_date’));
echo date_i18n($dateformatstring, $unixtimestamp);
?>
OTHER INFO
Field name: concert_date
Wp framework: divi builder
Plugin for ACF displaying: ACF injector
Web site language: da_DK
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.