Forums / Templates, Stylesheets, Page Layout / Spanish.php override makes page blank

Spanish.php override makes page blank

Locked

Views: 3,132

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
11 Sep 2007, 2:04 PM
#1
nugar avatar

nugar

New Zenner

Join Date:
Sep 2007
Posts:
21
Plugin Contributions:
0

Spanish.php override makes page blank

Hi all,

I apologize if this has come up previously, but being a Spanish speaker I can't think of the correct words to search for this question!

I'm a new user of Zen, formerly an osC user, but discovered Zen when trying to add a shopping cart to my photography site.

Now I'm starting to build a site from the ground up for my brother in law.

I installed a Spanish language pack and when trying to edit the footer, since the language pack comes with a legend I want to change, the page went blank.

More info:

The page is at http://www.atvpanama.com

I've named my template "atvpanama"

Now I have:

/includes/languages/atvpanama
/includes/languages/spanish
/includes/languages/spanish/atvpanama

I uploaded /includes/languages/atvpanama/spanish.php with the new footer and the page went blank. No error, no nothing, not even source code.

Now, if I try to edit the English version, and upload /includes/languages/atvpanama/english.php it works with no problems at all.

Next, I tried renaming /includes/languages/atvpanama/english.php to /includes/languages/atvpanama/spanish.php and it breaks again! So it doesn't seem to be the code nor anything changed in the footer text definition.

I have no clue as to what can be happening... maybe there is another place where I need to define something? I have to say that I've edited /includes/languages/spanish/atvpanama/header.php and /includes/languages/spanish/atvpanama/index.php and both work with no problems at all.

Thanks in advance,

Humberto Olarte Cupas
http://nugar.com/

22 Sep 2007, 4:17 PM
#2
nugar avatar

nugar

New Zenner

Join Date:
Sep 2007
Posts:
21
Plugin Contributions:
0

Re: Spanish.php override makes page blank

No one?

19 Dec 2007, 3:30 PM
#3
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Re: Spanish.php override makes page blank

Hi,

I'm using the Spanish language pack by Jorge.

Zen Cart 1.37
when spanish.php was first placed in the mytemplate/ folder it caused
"Fatal error: Cannot redeclare zen_date_raw()"

However after changing all the necessary code in both the spanish.php files to use the date of birth in dd/mm/yyyy format as detailed in this superb post:
http://www.zen-cart.com/forum/showth...t=57548&page=2
it cured the fault.

Zen Cart 1.38 & 1.38a
Now mytemplate/spanish.php causes a blank screen.
If the same file is used in the directory above (and mytemplate/spanish.php renamed to disable it) all is ok.

So, any guidance available on what to search for?

regards
Steve

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

19 Dec 2007, 5:11 PM
#4
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Re: Spanish.php override makes page blank

Hi,
I could not see how to edit the above post but to correct it further,
one of the errrors in /languages/spanish.php that you fix while changing the date of birth format is:

function zen_date_raw($date, $reverse = false) {
if ($reverse) {
return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4);
} else {
return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2);
}
}

which becomes

if (!function_exists('zen_date_raw')) {
function zen_date_raw($date, $reverse = false) {
if ($reverse) {
return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);
} else {
return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2);
}
}
}

The important thing is the overall if... statement. as detailed here
http://www.zen-cart.com/forum/showpost.php?p=216219&postcount=3

The 3,2 etc may not be applicable to your locale.

I had not made this change and it so returned a blank page.

So, no further action necessary on this for me,

regards
Steve

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...