FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


counter-date in mother tongue?





shrykull
Hi, I set up oscommerce app. on frihost. All working well exceprt for the display of date in the counter area in the bottom. I am Pole and the eshop is translated into Polish. I mean there appears "January" instead of "Styczeń" etc. So the question is whether it is due to server configuration or I should edit includes/languages/polish.php file?

http://www.modalux.frih.org/index.php

Rgards,
Shrykull
rvec
the problem has to be in the software, can't be the server.
If you can edit the language file you're lucky, but knowing oscommerce it could be somewhere else in the code.
shrykull
rvec, following your advice I investigated OSC forum and see what I have got:
http://forums.oscommerce.com/index.php?showtopic=327050
Don't know what to think now?
rvec
hmm that's just weird, and wrong. They say it's the os (user or server?) that makes those names. Probably deserves a hack Razz
hmm they did try to set the locale, but it probably doesn't work on frihost (no polish locale installed).

This is from the english lang file, but I'm sure you can translate it.

replace the date define part by this (line 19-24 in the default english one).
Translate and fill the days and months array, and send me back the errors Razz

Code:
$days = array('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun');
$months = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul');
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');
shrykull
RVEC,
I try doing what you suggested, namely I edited catalog/includes/languages/polish.php file in this way:

Quote:
@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');


And an error occured:
Quote:
Parse error: syntax error, unexpected '%', expecting ')' in /usr/home/shrykull/domains/modalux.frih.org/public_html/includes/languages/polish.php on line 31

So it seems as if it does not work in this way, or I still do it wrong?

P.S. If you want you can try something in php files without my authorisation.
rvec
oops
Code:
@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');

strftime wants a string, it should work now.
shrykull
RVEC,
You Ruleeee!!!
All went smooth, Thank You!
Related topics
any translations?
Languages
A dutch section in the Other Languages forum
Newbie alert! Come gimme a hug!!!
Narrow scope of forums
Mod for phpBB
Any good resources for learning German online?
china russia brazil or india ?
Court shuts down German wikipedia site
Interesting Science Questions:
German forum?
Argentina!!!!!!!!
Language learning ??
Contaminated milk products from China
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.