Display date on frontend in other language

Support General Display date on frontend in other languageResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #35585
    Martin RosnerMartin Rosner
    Participant

    How to change the display of a date-field on frontend in another language? Can anybody give me a beginners guide to fix this? I just started with metabox and using oxygenbuilder... many thanks in advance!

    #35600
    Long NguyenLong Nguyen
    Moderator

    Hi Martin,

    To display the date field in another language, please enable the setting timestamp, change the site language in Settings > General.

    Then use the WordPress function date_i18n() to display the date in localized format.

    $value = rwmb_meta( $field_id );
    echo date_i18n( 'F j, Y', $value );

    Refer to this topic https://support.metabox.io/topic/problem-displaying-images-videos-and-date-format-in-french/

    In case of using Oxygen builder, you need to contact Oxygen support to ask to implement the code.

    #42846
    Richard LapointeRichard Lapointe
    Participant

    Hi Long, I'm in breakedance and I have the same problem. I try different think with Chat GPT but notting work. I'm not a programmer and french. Here wath I use: a group field ID:seance, a metabox field date ID:date-seance display in CPT ID:seances. I try to display my date value in french. I will check the timestamp option but can you display the complet function date_i18n() with :

    <div>$value = rwmb_meta( $field_id );
    echo date_i18n( 'F j, Y', $value );</div>

    Because I'm beginer and can't analyse the link you display in this post and make it my own. I don't understand the code well and select the good part. Could you help me please.

    #42858
    PeterPeter
    Moderator

    Hello,

    You can read more about post templates in the WordPress documentation https://developer.wordpress.org/themes/template-files-section/post-template-files/

    If you are not familiar with coding and want to apply the code on your site, please contact Breakdance support and ask for implementing the code.

    Or contact us here https://metabox.io/contact/, our development team will help you with an extra fee.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.