Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

date in ENGLISH instead of polish, what to do?


shrykull

Recommended Posts

Hi I set up oscommerce on freeserver modalux.frihost.org, all went fine except for translation of date in the counter area. So I still get January instead of "Styczeń". I have done searching and I found out that the files responsible for such lack of translation are located in catalog/includes/languages/ polish.php , but I still don't know what to change. Can somebody advice me on how to get the date right in polish?

 

this is how I have in polishphp file:

// zobacz w katalogu $PATH_LOCALE/locale dostępne lokalizacje..

// w RedHacie powinno być 'pl_PL'

// we FreeBSD sprawdź 'pl_PL.ISO_8859-2'

// w Windows spróbuj 'pl', lub 'Polski'

@setlocale(LC_TIME, 'pl_PL.ISO_8859-2');

 

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

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

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

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

Link to comment
Share on other sites

Unfortunately the text for the days and months are from the operating system not osc

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

geoffreywalton, You were right and wrong at the same time.

On frihost no polish locale has been installed, yet extra code to language file did its job.

 

@setlocale(LC_TIME, 'pl_PL.ISO_8859-2');

$days = array('Pon', 'Wt', 'Śr', 'Czw', 'Pt', 'Sob', 'Niedz');
$months = array('Stycz', 'Lut', 'Mar', 'Kwiec', 'Maj', 'Czerw', 'Lip', 'Sierp', 'Wrzes', 'Paźdz', 'List', 'Grudz');
define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime()
define('DATE_FORMAT_LONG', $days[strftime('%u')].' %d '.$months[strftime('%m')-1].', %Y'); // this is used for strftime()
define('DATE_FORMAT', 'm/d/Y'); // this is used for date()
define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');

 

This piece of code in polish.php file worked 4 me fine!

See yourself: link

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...