Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change date for spanish/french language


DccD

Recommended Posts

Posted

Hi,

 

I'm setting up my store which is a multilingual one, and when I switch to spanish or french the date at the bottom is still in english.

Is there a way to make it display in spanish and/or french ?

 

Thanks :D

Posted

Hi. I'm kind of new in here, but I made it in my store (portuguese).

Edit the file language you want to change (/catalog/includes/languages/yourlanguage/yourlanguage.php), and in the beginning find "@setlocale(LC_TIME, 'us_US.ISO_8859-1');"

and change to you language code, I think for french is: "@setlocale(LC_TIME, 'fr_FR.ISO_8859-1'); "

The next lines change to:

define('DATE_FORMAT_SHORT', '%d/%m/%Y'); // this is used for strftime()

define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()

define('DATE_FORMAT', 'd/m/Y'); // this is used for date()

define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');

 

and next:

function tep_date_raw($date, $reverse = false) {

if ($reverse) {

return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4);

} else {

return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2);

}

}

 

Think that's all. Let me know if it works.

Bye

Posted

Thank you for your help,

 

I found where I have to make some modifications. There were already done but it's not showing spanish neither french dates. It seems my server doesn't support other locales than US. :(

Is there a way to find it out ? Maybe I should ask my host provider ?

 

I'll try that

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...