How to display match date field in your language

Easiest option is using a numeric date format (For example; Y/m/d – 2010/11/06);

Click here for more information…

But if you have to use month/day names, you should edit 3 files;

Be very careful during editing codes. If you miss a single character,letter etc. You will get an error…

1) homebox.php (in Sporty fixtures results sponsors plugin)

2) fixture-shortcode.php (in Sporty fixtures results sponsors plugin. (Added on Sporty 1.5. If you are using an older version, you don’t need to edit this file.))

3) single-sportyresults.php (in Sporty theme folder)

How to do this

1) Find the following codes on these pages;

$matchdate = new DateTime();
$matchdate->setTimestamp(get_post_meta( get_the_id(), 'sportymatchdate', true ));

2) Add the new codes like the following;

$matchdate = new DateTime();
$matchdate->setTimestamp(get_post_meta( get_the_id(), 'sportymatchdate', true ));
setlocale(LC_TIME, 'fr_FR');
$translateddate = utf8_encode(strftime('%e %B %Y', get_post_meta( get_the_id(), 'sportymatchdate', true )));

3) In this example I used fr_FR for French. The first two letters are for the language code and the other two letters are for the country code. You should change it with your language/country code. I don’t know my language code…

For example for German, you should use de_DE …

4) You can also change the date format (%e %B %Y). click for more information…

5) Finally, Find the following code;

$matchdate->format(get_option('date_format'))

6) And change it with the following

$translateddate