Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1

    Localization problem - month names

    Hello everyone!

    So, I've been onto translating the language packs to Hungarian, and what I've been unable to translate is the months names.
    I localized the strings for it, but no matter what I do, it won't take effect. Basicly I have problem with the "New products" and the "Monthy specials" headline on the very first page. It will display the headline in hungarian, but the month will be in english, no matter what I do.
    I looked into the source, and it gets the month name by the variable "%B". I tried setting it to "%m", (etc. :) after which, of course, it showed me "06" instead of "June". Where does it read "%B" from???
    The nicest thing is, that I disabled the english language pack, cleared all caches, searched all of the source for month names, but to no success. It stills reads the English month names from somewhere. I'm out of ideas. Anyone?

    f.

  2. #2
    Join Date
    May 2004
    Location
    Hong Kong
    Posts
    1,291
    Plugin Contributions
    1

    Default Re: Localization problem - month names

    Please refer to the doc of wiki
    Date format


    .
    A New Starter again

  3. #3

    Default Re: Localization problem - month names

    Thanks for the link. So it is basicaly a php server setting.
    It seems that the setlocale parameter wasn't set properly, but after setting it according to the string in the MSDN help, it still gets back the default en_US month names.
    I use WinXP with EasyPHP for testing, can somebody give another clue as to what needs to be done? I could only find french support forums are on the net...
    f.

  4. #4
    Join Date
    May 2006
    Posts
    4
    Plugin Contributions
    0

    Default Re: Localization problem - month names

    I've run into the same problem recently...
    So, You may fix it as follows:

    $month_number=date('m');
    switch($month_number)
    {
    case '01': $temp='January in Hungarian';break;
    case '02': $temp='February in Hungarian';break;
    ...
    ...
    case '12': $temp='December in Hungarian';break;
    }

    define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For '. $temp);

    It should be done in /includes/languages/your_templates/hungarian.php

    It works for me (I need Bulgarian on my site).
    Hope that helps.

  5. #5
    Join Date
    Apr 2006
    Location
    Sofia, Bulgaria
    Posts
    203
    Plugin Contributions
    0

    Default Re: Localization problem - month names

    I contributed One version of Bulgarian Language pack but still have some untranslated sections like email section and some of payment metods couse we dont use it here in bulgaria but I hope soon to translate the email section and make some correction but U know bulgarian a little bit u can configure somethings.

    http://www.zen-cart.com/index.php?ma...ex&cPath=40_46

    hope soon to upload new version of translation and buttons as soon as i finnish here with some problems. Then I will have time to concentrate of my shop.

  6. #6
    Join Date
    May 2006
    Posts
    4
    Plugin Contributions
    0

    Default Re: Localization problem - month names

    Ok. I'll see what I can do.
    Thanks for the link.

  7. #7
    Join Date
    Jan 2007
    Posts
    2
    Plugin Contributions
    0

    Default Re: Localization problem - month names

    Quote Originally Posted by seethrou View Post
    Please refer to the doc of wiki
    Date format


    .
    Thanks seethrou, you resolved all my problems =]

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

    Default Re: Localization problem - month names

    Quote Originally Posted by Vik View Post
    I've run into the same problem recently...
    So, You may fix it as follows:

    $month_number=date('m');
    switch($month_number)
    {
    case '01': $temp='January in Hungarian';break;
    case '02': $temp='February in Hungarian';break;
    ...
    ...
    case '12': $temp='December in Hungarian';break;
    }

    define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For '. $temp);

    It should be done in /includes/languages/your_templates/hungarian.php

    It works for me (I need Bulgarian on my site).
    Hope that helps.
    Actually this shows the month on user's computer (it can be set wrong) so try this: in /includes/languages/<defaut language>.php
    change the original setlocale with this

    @setlocale(LC_ALL, 'bg_BG.cp1251','Bulgarian');

    (this example is in Bulgarian I don't know the Hungarian charsets)

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

    Default Re: Localization problem - month names

    Quote Originally Posted by LazarD View Post
    Actually this shows the month on user's computer (it can be set wrong) so try this: in /includes/languages/<defaut language>.php
    change the original setlocale with this

    @setlocale(LC_ALL, 'bg_BG.cp1251','Bulgarian');

    (this example is in Bulgarian I don't know the Hungarian charsets)
    had a similar problem with hebrew and russian...
    thanx man...
    helped a lot...
    turns out... that atleast in windows.... setting the LC_TIME to LC_ALL is the BIG difference
    thanxx!!

  10. #10
    Join Date
    Oct 2007
    Location
    France & Luxembourg
    Posts
    37
    Plugin Contributions
    0

    red flag Re: Localization problem - month names

    Quote Originally Posted by seethrou View Post
    Please refer to the doc of wiki
    Date format
    This wiki doc resolved my issue with localized dates, to be more precise month names being displayed in english instead of french / german.
    How to adapt dates to display in language of the localization, read it
    and follow the steps to setlocale
    AND
    to modify zen_date_raw function
    Last edited by mypashop; 23 Jul 2008 at 04:31 PM. Reason: removed signature

 

 
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
    By elgar in forum Addon Language Packs
    Replies: 0
    Last Post: 21 Oct 2008, 10:51 PM
  3. Localization problem
    By elgar in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Sep 2008, 08:47 AM
  4. Month Names in different languages
    By altryne in forum Addon Language Packs
    Replies: 11
    Last Post: 22 Aug 2007, 05:59 AM

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