Can’t translate the post meta data (Date) in another language

I want to translate the post meta data (date) in chines language for example, September 13, 2017, should be translated as 2017年9月13. But my code gives it in English. Do you see any error? Please help.

Thank you in advance.

$time_string = ‘<time class=”entry-date published” datetime=”%1$s”>%2$s</time>’;
if (get_the_time(‘U’) !== get_the_modified_time(‘U’)) {
$time_string .= ‘<time class=”updated” datetime=”%3$s”>%4$s</time>’;
}

$time_string = sprintf($time_string,
esc_attr(get_the_date(‘c’)),
esc_html(get_the_date()),
esc_attr(get_the_modified_date(‘c’)),
esc_html(get_the_modified_date())
);
printf(__(‘<span class=”posted-on”><a href=”%1$s” title=”%2$s” rel=”bookmark”><i class=”fa fa-clock-o”></i> %3$s</a></span>’, ‘colormag’),
esc_url(get_permalink()), esc_attr(get_the_time()), $time_string
);

Read more here:: Can’t translate the post meta data (Date) in another language

Leave a Reply

Your email address will not be published. Required fields are marked *