Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2006
    Location
    Brisbane, Australia
    Posts
    26
    Plugin Contributions
    0

    Modifying english.php

    Good Morning Everyone,

    I am still fiddling around trying to learn all about the wonderful world of Zen Cart, and have a couple of questions about modifying the english.php file. I have made a copy of the file under a directory named after my template, but before playing with it wanted to make sure I'm doing the right thing. As an example, let's have a quick look at a small section from the file:

    // 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, 'en_US.ISO_8859-1');
    define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime()
    define('DATE_FORMAT_LONG', '%A %d %B, %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');

    If I change the date formats here to %d/%m/%y for DATE_FORMAT_SHORT and d/m/Y for DATE_FORMAT, will this then update all appearances of dates etc throughout the site as day/month/year as opposed to the American convention of month/day/year?

    Similarly, if I change the format for the DOB_FORMAT_STRING along the same lines, will this achieve the same result for the DOB field?


    Thanks,

    Christian

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

    Default Re: Modifying english.php

    Hello Christian-

    In theory that should work- but I have not tried it.

  3. #3
    Join Date
    Jun 2006
    Location
    Brisbane, Australia
    Posts
    26
    Plugin Contributions
    0

    Default Re: Modifying english.php

    Thanks Kim,

    I've gone through and updated it but now can't find anywhere in the store where the date is displayed in short format! lol...oh well I'm sure time will tell

  4. #4
    Join Date
    Dec 2005
    Posts
    152
    Plugin Contributions
    0

    Default Re: Modifying english.php

    I've just adjusted two files:

    includes/english

    and

    admin/includes/english

    and it worked beautifully - I'm no longer having to convert from American each time I look at a date!

    Thank you!!!

  5. #5
    Join Date
    Jun 2006
    Location
    Brisbane, Australia
    Posts
    26
    Plugin Contributions
    0

    Default Re: Modifying english.php

    Excellent! Thanks for letting me know Bryony... Just make sure if you're changing these files you do it using the override system (ie: make a copy of the file under a directory named after your template and edit that instead) so that you keep your changes through any upgrades etc...

    I think what I've just told you is right - I'm sure a (much) more knowledgeable user will correct me if I'm wrong.


    Regards,

    Christian

 

 

Similar Threads

  1. Lightbox Gallery - How to edit ENGLISH.PHP to FRENCH.PHP (no images showing)
    By imfsub12 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 4 Jun 2009, 02:09 PM
  2. modifying english.php breaks SOME things
    By PelicanArt in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 21 Jun 2008, 07:38 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