Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #28159

    I started localizing the .po file to Japanese using poedit. However, some parts are impossible to localize. Especially, the date/time formats are hard-coded like: “11 Aug 2013″, but it needs to be translated to “2013年 8月 11日”. As you can see the order of day, month, and year is different in Japanese. Can you make the code easier for us to localize? Preferrably, I would like the format match to a user’s profile, and if not logged in, it should match to the admin’s settings. Meanwhile, Can you tell me where I can modify in the PHP code so I can show the date/time format correctly to the Japanese audience?

    Thank you,

    #136693

    Hi,

    Enfold uses get_the_time(‘d M Y’) in wp-contentthemesenfoldincludesloop-index.php to display the time. Try to replace it with

    get_the_time(get_option('date_format'))

    to use the default wordpress format. I’ll ask Kriesi to include this change in the next update. The widgets offer a filter to change the format. Insert the code at the bottom of functions.php:

    function change_avia_date_format($date, $function) {
    $date = get_the_time(get_option('date_format'));
    return $date;
    }
    add_filter('avia_widget_time', 'change_avia_date_format', 10, 2);

    #136694

    Hi Dude,

    This has resolved the issue beautifully. Thanks so much for your support!

    #136695

    Hey!

    Great :)

    Best regards,

    Peter

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Enfold localization (date/time format)’ is closed to new replies.