我正在写一篇wordpress帖子I want the date/time in frech format as shown below:
ENGLISH
By FJ
Published April 9, 2019 at 4:05 p.m.
Last updated April 9, 2019 at 4:14 p.m.
FRENCH
Un texte de FJ
Publié le 9 avril 2019 à 16 h 05
Mis à jour le 9 avril 2019 à 16 h 14
我使用以下代码为wordpress post提取了英语/法语的日期/时间:<strong><?php if(ICL_LANGUAGE_CODE==\'en\'){ ?>
By
<?php }else{ ?>
Un texte de
<?php } ?><?php the_author(); ?> </strong><br>
<strong><?php if(ICL_LANGUAGE_CODE==\'en\'){ ?>
Published
<?php }else{ ?>
Publié le
<?php } ?><?php the_time(\'F j, Y\'); ?> <?php if(ICL_LANGUAGE_CODE==\'en\'){ ?>
at
<?php }else{ ?>
à
<?php } ?> <?php the_time(\'g:i a\'); ?> </strong><br>
<strong><?php if(ICL_LANGUAGE_CODE==\'en\'){ ?>
Last updated
<?php }else{ ?>
Mis à jour le
<?php } ?><?php the_modified_time(\'F j, Y\'); ?> <?php if(ICL_LANGUAGE_CODE==\'en\'){ ?>
at
<?php }else{ ?>
à
<?php } ?> <?php the_modified_time(\'g:i a\'); ?> </strong>
上述代码displays the following o/p which is not correct(date and time format) in the case of french. 英语不错,但法语似乎不行。By FJ
Published April 9, 2019 at 4:05 p.m.
Last updated April 9, 2019 at 4:14 p.m.
Un texte de FJ
Publié le avril 9, 2019 à 4:05
Mis à jour le avril 9, 2019 à 5:14