Guest Posted February 15, 2004 Posted February 15, 2004 OsCommerce works fine...however, under New Products For February doesn't. Here is the problem. When click English as the language...it shows as "New Products For February", but when I click Spanish as my language...it shows as "Nuevos Productos En February" The translation is done perfectly except for the date part. The date still shows as English and not in Spanish. Instead of February, I want it to show as Febrero, or whatever the date will be in the coming months. For example...Enero, Febrero, Marzo, Abril, etc... So what file do I need to go and change the values?
agent Posted February 15, 2004 Posted February 15, 2004 I'm facing the same problem. I did all installing, modifying etc. on my local server. All was working like a charm, when switching between languages the date format switched accordingly. After I was done with all config I?ve moved all to the commercial server. Now, no mater what language I choose the date stays in English. It makes me thinking that this must be php config rather then the shop. Had a look in the footer and see: <table border="0" width="800" cellspacing="0" cellpadding="1" align="center"> <tr class="footer"> <td class="footer"> <?php echo strftime(DATE_FORMAT_LONG); ?> </td> <td align="right" class="footer"> <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?> </td> </tr> </table> ;<?php echo strftime(DATE_FORMAT_LONG); ?> How does that work in the php? How is it taking a proper language value? Whats needs to be changed in order to get it properly working? Thanks for your support.
agent Posted February 15, 2004 Posted February 15, 2004 Ok, Looks like I found it. It really depens on the OS. In the main language page e.g /includes/language/espanol.php you will find on the to of the page the following description: / look in your $PATH_LOCALE/locale directory for available locales // or type locale -a on the server. // Examples: // on RedHat try 'es_ES' // on FreeBSD try 'es_ES.ISO_8859-1' // on Windows try 'sp', or 'Spanish' And here it is what sets it up @setlocale(LC_TIME, 'es_ES.ISO_8859-1'); This works fine for the RedHat so follow the description and check on your server locale -a Find the spanish seting and check @setlocale corespondingly. Should work fine.
Guest Posted February 15, 2004 Posted February 15, 2004 Ok, I went to OScommerce Admin and clicked on Server Info. It says that Server OS is FreeBSD. So then I went to the language file...espanol.php and checked the top part where I need to set the @setlocale.... I tried all of them and still didnt change the date to spanish. Does this setting change the "New Products in xxxxx (Date)"? Or does it change the date that is below "New Products in February"? What does it mean to try "locale -a"? Thanks for the help agent
agent Posted February 15, 2004 Posted February 15, 2004 What locale -a means is that you have to give this command on the serwer (you might need to contact your admin if you dont have shell accces to the serwer). You shold see the following response (this one is from my RedHat 9.0 server): ...... eu_ES.utf8@euro fa_IR fa_IR.utf8 fi_FI fi_FI@euro fi_FI.iso88591 fi_FI.iso885915@euro fi_FI.utf8 fi_FI.utf8@euro finnish fo_FO fo_FO.iso88591 fo_FO.utf8 fran?ais fr_BE fr_BE@euro fr_BE.iso88591 fr_BE.iso885915@euro fr_BE.utf8 fr_BE.utf8@euro es_ES <<<<<<<<<<<<<<<<(Spanish starts) es_ES@euro es_ES.iso88591 es_ES.iso885915@euro es_ES.utf8 es_ES.utf8@euro<<<<<<<<<< (ends) ....... Find out a spanish one (es_ES.iso88591 in this case but it will probably be a different one for you). I've checked, on on my serwer 'es_ES.ISO_8859-1' does work. Play with @setlocale(LC_TIME, 'es_ES.ISO_8859-1'); this controlles date and time in every place at your shop. The date is just taken form the server by echo strftime(DATE_FORMAT_LONG). You have to say to your server what language you want him to replay it back.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.