ERROR IN SPANISH.PHP file causing
"Fatal error: Cannot redeclare zen_date_raw()"
Hi,
I thought I would add this info about a fault in the Spanish language pack 1.37 by Jorge.
If \includes\languages\spanish.php is copied into the custom template directory to be edited, when changing from English to Spanish when using the custom template the site crashes giving the above error.
I found two faults
- the file has been edited to change the date of birth to non-US dd/mm/yyyy format but the other \admin\includes\languages\spanish.php file was left in US mm/dd/yyyy format
- the structure of the zen_date_raw declaration is in the pre 1.3 format without an overall “if” operator. (See the english.php to compare)
Despite copying and pasting the english segment of code to the spanish file it still would not work.
However after changing all the necessary code in both files to use the dd/mm/yyyy format as detailed in this superb post:
http://www.zen-cart.com/forum/showthread.php?t=57548&page=2
the fault was fixed.
Yes, a happy ending::clap:
Hope this saves someone the hours I lost on this.
Regards
Steve
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...