Forums / General Questions / how to translate months and weekkdays?

how to translate months and weekkdays?

Views: 3,045

Results 1 to 8 of 8
3 Nov 2006, 7:47 PM
#1
cian42 avatar

cian42

New Zenner

Join Date:
Nov 2006
Posts:
4
Plugin Contributions:
0

how to translate months and weekkdays?

I can't translate the neme of the months and weekdays cause i don't find their location. Does anywone know wehere they are located?

3 Nov 2006, 7:55 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: how to translate months and weekkdays?

You probably need to set the locale properly:
http://www.zen-cart.com/wiki/index.php/Date_Format

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Nov 2006, 3:34 PM
#3
cian42 avatar

cian42

New Zenner

Join Date:
Nov 2006
Posts:
4
Plugin Contributions:
0

Re: how to translate months and weekkdays?

this is what i have:

// look in your $PATH_LOCALE/locale directory for available locales..
// on RedHat try 'en_US'
// on FreeBSD try 'en_US.ISO_8859-1'
// on Windows try 'en', or 'English'
@setlocale(LC_TIME, 'ro.ISO_8859-1');
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');

The locale seems to be ser correctly(ro from romanian), does this mean the server does not have the romanian locale installed?

5 Nov 2006, 5:19 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: how to translate months and weekkdays?

I'm only guessing ... but you might try this:

@setlocale(LC_TIME, 'ro_RO.ISO_8859-1');

Or you could ask your host whether they have RO locale support installed on your server.
http://ca.php.net/manual/en/function.setlocale.php

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

6 Nov 2006, 9:48 AM
#5
cian42 avatar

cian42

New Zenner

Join Date:
Nov 2006
Posts:
4
Plugin Contributions:
0

Re: how to translate months and weekkdays?

tried that, but it didn't work(thanks anyways).
i'm talking to the host to see what the problem is.

28 Dec 2007, 4:53 PM
#6
manu2k5 avatar

manu2k5

New Zenner

Join Date:
Dec 2007
Location:
Bucharest
Posts:
2
Plugin Contributions:
0

Re: how to translate months and weekkdays?

hi (salut)

i had the same problem. i put this in romanian.php and it works just fine.

 @setlocale(LC_ALL, 'romanian');
28 Dec 2007, 5:05 PM
#7
manu2k5 avatar

manu2k5

New Zenner

Join Date:
Dec 2007
Location:
Bucharest
Posts:
2
Plugin Contributions:
0

Re: how to translate months and weekkdays?

or u can use just

 @setlocale(LC_TIME, 'romanian');  
18 Jan 2011, 11:23 AM
#8
voxsteel avatar

voxsteel

New Zenner

Join Date:
Jan 2011
Posts:
3
Plugin Contributions:
0

Re: how to translate months and weekkdays?

use this:

@setlocale(LC_ALL, 'ro_RO.ISO8859-1', 'ro_RO.ISO-8859-1', 'ro', 'ro_RO', 'ro_RO', 'rom', 'romanian');