Home Forums General Issues Translate date WPML Reply To: Translate date WPML

  • Hi!

    You’ll need to first change it to unix timestamp and then use
    date_i18n function.. here’s a snippet:

    <?php $timestamp = strtotime(get_field('yourdatefield')); ?>
    <time datetime="<?php echo date(DATE_W3C); ?>" pubdate class="updated"><?php echo date_i18n( 'j M', $timestamp); ?></time>

    The key parts here is the first row and then the date_i18n function.. Change the first parameter of date_i18n (j M) to whatever timeformat you require 🙂