Zen Cart Logo
Forums / Addon Language Packs / Month Names in different languages

Month Names in different languages

Locked

Views: 11,054

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
2 Aug 2007, 6:56 AM
#1
altryne avatar

altryne

New Zenner

Join Date:
Jul 2007
Posts:
16
Plugin Contributions:
0

Month Names in different languages

OK guys I searched for this and what I found helped a bit but there's still a problem
I use 2 language packs in my shop
russian and hebrew
:lamo:
in both of them I got the months names in english language...
I mean the string "New products for" was in my language(either hebew or russian) and the month name itself (eg. August) was in english
So I went to heberw.php after reading here and changed setlocale to 'hebrew'
and it worked
ok so I was happy and went to russian.php to do the same thing
I changed it to 'ru_RU' and to "russian'
and all I get is question marks
I counted them... and it seems that the month name is displayed in correct but just doesn't allow russian characters...
The rest of the site displays russian language just fine...
Plz help

2 Aug 2007, 2:00 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,616
Plugin Contributions:
0

Re: Month Names in different languages

The date functions are handled by the server.

2 Aug 2007, 2:17 PM
#3
altryne avatar

altryne

New Zenner

Join Date:
Jul 2007
Posts:
16
Plugin Contributions:
0

Re: Month Names in different languages

thanks for replying but I didn't understand your answer....
what am I suppose to do so that russian month names will appear in russian and not question marks?

2 Aug 2007, 8:16 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: Month Names in different languages

altryne:

I changed it to 'ru_RU' and to "russian'
and all I get is question marks
I counted them... and it seems that the month name is displayed in correct but just doesn't allow russian characters...I don't speak russian, so I have no idea what exactly will need to be done; however, the usual cause of question marks being displayed in place of actual characters ... is that the font or character set specified ... isn't available on your computer. Either that or your server's PHP configuration doesn't fully support the russian locale.

Maybe you need to change the CHARSET as well ?

You might want to check out the Russian support site ... http://zen-cart.ru/ I suspect they've had to deal with this problem before.

3 Aug 2007, 8:10 AM
#5
altryne avatar

altryne

New Zenner

Join Date:
Jul 2007
Posts:
16
Plugin Contributions:
0

Re: Month Names in different languages

it's not only russian... it's in hebrew as well
I cahnged coputers and on this one both hebrew and russian month names are in quetion marks...
I suspect that maybe the month names that are apsses from the server are UTF... and the zen cart files are all ANSI?
maybe that's the problem?

4 Aug 2007, 5:25 AM
#6
canopy avatar

canopy

Totally Zenned

Join Date:
Oct 2006
Posts:
625
Plugin Contributions:
0

Re: Month Names in different languages

Following on from what DrByte says to add a charset, try this:

Set the locale for russian.php as:

@setlocale(LC_TIME, 'ru_RU.ISO_8859-5');
```If that does not work, try with different charsets as follows:

```php
@setlocale(LC_TIME, 'ru_RU.utf-8');
@setlocale(LC_TIME, 'ru_RU.koi8-r');
```Btw, I'm assuming the following:- You are hosted on a Unix/Linux platform.
- You have the necessary Russian/Hebrew fonts on both your computers.PS: I don't understand Russian or Hebrew also.
4 Aug 2007, 9:21 AM
#7
altryne avatar

altryne

New Zenner

Join Date:
Jul 2007
Posts:
16
Plugin Contributions:
0

Re: Month Names in different languages

thanx for your reply canopy...
well I tried all three locales you gave me....
all three of them made the month be in english
I'm hosted at my own computer(win xp) with xampp

4 Aug 2007, 5:22 PM
#8
canopy avatar

canopy

Totally Zenned

Join Date:
Oct 2006
Posts:
625
Plugin Contributions:
0

Re: Month Names in different languages

The month is displayed via the ```php
strftime('%B')


Unfortunately, Windows locale information is specified *differently *from Unix/Linux servers so its a bit more complicated.

I have tested the following settings work on a Linux host for a Russian locale:

@setlocale(LC_TIME, 'ru_RU.ISO_8859-5');
define('HTML_PARAMS','dir="ltr" lang="ru"');
define('CHARSET', 'windows-1251');

Which displays 'August' in English as 'Августа' in Russian.
18 Aug 2007, 10:34 AM
#9
lazard avatar

lazard

New Zenner

Join Date:
Jul 2007
Posts:
3
Plugin Contributions:
0

Re: Month Names in different languages

In the /includes/languages/<defaut language>.php file you need to replace:

@setlocale(LC_TIME, 'ru_RU.ISO_8859-5');  

with this one:

@setlocale(LC_ALL, 'ru_RU.ISO_8859-5');  

that works in most of the cases

18 Aug 2007, 12:16 PM
#10
altryne avatar

altryne

New Zenner

Join Date:
Jul 2007
Posts:
16
Plugin Contributions:
0

Re: Month Names in different languages

that does work... strangely enough LC_ALL and LC_TIME is the difference
mine is working witth
@setlocale(LC_ALL, 'russian');

21 Aug 2007, 8:58 PM
#11
altryne avatar

altryne

New Zenner

Join Date:
Jul 2007
Posts:
16
Plugin Contributions:
0

Re: Month Names in different languages

Guys I'm in another pikle!!
turns out that the previous solution(view above) is good for windows...
now I have the settings that are here... and I'm on a linux host...
and it does not work...
The date is encoded in Cyrrilic(ISO) instead of Cyrrilic(Windows) like the rest of the site...
can this be a hosting issue?
I'm currently in a firce back and forth emailing with support of a host.
they say it's coding.. i say to them that it's their host.. and it's not configured proporaly...
any advice guys?

22 Aug 2007, 4:59 AM
#12
drbyte avatar

drbyte

Sensei

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

Re: Month Names in different languages

If you're sending the correct locale code to the server, then the server should serve up the right thing.
If the server doesn't have the locale settings you're looking for, it may be selecting a next-best option.

Check that you're sending the right thing to the server.
If it doesn't work when you send the right locale code, then the problem is on the server (host).
Your host may be able to help you determine the right locale codes that they support.