Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jul 2007
    Posts
    16
    Plugin Contributions
    2

    Default 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

    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
    Last edited by altryne; 2 Aug 2007 at 08:01 AM.

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Month Names in different languages

    The date functions are handled by the server.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Jul 2007
    Posts
    16
    Plugin Contributions
    2

    Default 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?

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Month Names in different languages

    Quote Originally Posted by altryne View Post
    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.
    .

    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.

  5. #5
    Join Date
    Jul 2007
    Posts
    16
    Plugin Contributions
    2

    Default 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?

  6. #6
    Join Date
    Oct 2006
    Posts
    624
    Plugin Contributions
    0

    Default 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:

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

    PHP Code:
    @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.
    Goh Koon Hoek, author of "e-Start Your Web Store with Zen Cart".
    Printed book: www.lulu.com/content/10576284
    Electronic book and Errata: www.cucumbermedia.com/store

  7. #7
    Join Date
    Jul 2007
    Posts
    16
    Plugin Contributions
    2

    Default 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

  8. #8
    Join Date
    Oct 2006
    Posts
    624
    Plugin Contributions
    0

    Default Re: Month Names in different languages

    The month is displayed via the
    PHP Code:
    strftime('%B'
    function in PHP which makes use of the locale you set in russian.php.

    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.
    Goh Koon Hoek, author of "e-Start Your Web Store with Zen Cart".
    Printed book: www.lulu.com/content/10576284
    Electronic book and Errata: www.cucumbermedia.com/store

  9. #9
    Join Date
    Jul 2007
    Posts
    4
    Plugin Contributions
    0

    Default Re: Month Names in different languages

    In the /includes/languages/<defaut language>.php file you need to replace:
    PHP Code:
    @setlocale(LC_TIME'ru_RU.ISO_8859-5'); 
    with this one:
    PHP Code:
    @setlocale(LC_ALL'ru_RU.ISO_8859-5'); 
    that works in most of the cases

  10. #10
    Join Date
    Jul 2007
    Posts
    16
    Plugin Contributions
    2

    Default 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');

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 Month names not appearing correctly
    By tips007 in forum General Questions
    Replies: 1
    Last Post: 19 Oct 2012, 10:45 PM
  2. Localization problem - month names
    By fricy in forum Addon Language Packs
    Replies: 15
    Last Post: 25 Feb 2011, 03:56 PM
  3. How can I change month's names?
    By elgar in forum General Questions
    Replies: 5
    Last Post: 29 Dec 2010, 11:12 PM
  4. Different category and sub-cat images for different languages
    By ultraman in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 10 May 2007, 05:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg