Zen Follower
- Join Date:
- Feb 2006
- Location:
- UK
- Posts:
- 300
- Plugin Contributions:
- 0
English.php won't override?
/includes/languages/english.php
Wait my bad!
I wish we could delete posts ... !
Views: 6,632
Zen Follower
/includes/languages/english.php
Wait my bad!
I wish we could delete posts ... !
Zen Follower
Having the same issue:
/includes/languages/Swedish.php is copied to
/includes/languages/custom_templ/Swedish.php
If both files exist: I get:
Fatal error: Cannot redeclare zen_date_raw() (previously declared in \includes\languages\custom_templ\Swedish.php:58) in \includes\languages\Swedish.php on line 58
If I use the override file only:
Warning: main(includes/languages/Swedish.php): failed to open stream: No such file or directory in \includes\init_includes\init_templates.php on line 72 etc etc
??
Zen Follower
Resolved on my part, unknown issue in swedish.php file. When getting rid of some old definitions it worked again.
Oba-san
Pauls:
/includes/languages/english.php
Wait my bad!
I wish we could delete posts ... !
When you find your own solution ... post it so that it can help others ... :smile:
Zen Follower
Ajeh:
When you find your own solution ... post it so that it can help others ... :smile:
Hehehe Linda, now you know I always do this, however in this case I had already fixed whatever it was I was concerned with, or the post had nothing to do with the error I was having. Therefore, I wanted to delete this post as it wasn't relevant.
One really should be able to delete a post one creates, unless other people have started to post replies ... which wasn't the case here, you can see I was the next person to post, and I would have deleted this post then. :bigups:
Zen Follower
Ajeh:
When you find your own solution ... post it so that it can help others ... :smile:
... will do for sure, in my case the language (swedish.php) file I updated to 1.3.0 had extra definitions for some old mod, which in theory should not break anything (I guess), but when getting rid off all the extras it worked. Tool I use is Files Comparer (freeware), https://www.script-debugger.com.
Zen Follower
This is actually still an issue for me, I want to override english.php so I can add my sites copyright info into the footer. I note that english.php is here includes/languages/english.php, so I created a folder in here includes/languages/mysitesstyle/ and copied the english.php into there. However, the site still sees the original english.php ignoring my override, thanks for your help.
Totally Zenned
Pauls:
This is actually still an issue for me, I want to override english.php so I can add my sites copyright info into the footer. I note that english.php is here includes/languages/english.php, so I created a folder in here includes/languages/mysitesstyle/ and copied the english.php into there. However, the site still sees the original english.php ignoring my override, thanks for your help.
Check you haven't made a typo in the over ride directory name
is it mysitesstyle or mysitestyle?
Zen Follower
No the overrides folder is correctly named
Oba-san
Have you an URL to this site?
Zen Follower
Its ok fixed, I hadn't uploaded the folder, thanks
Oba-san
Dontcha hate when it does what you say and not what you mean ... :blink:
Thanks for the update ... :smile:
Zen Follower
heh heh exactly :blush:
New Zenner
I'm trying to set up my first ZenCart, barely treading water. I hope my method of posting is proper here.
This thread and the one on changing page titles were very good at helping me find the right files to change.
However, I changed includes/languages/english/meta_tags.php and got the result I wanted. I saved that file into my includes/languages/sue/ folder and uploaded that into the includes/languages directory with some slight changes to the file. Those changes do not show up on the site.
It seems I'm missing something, but I don't know what. Have I misinterpreted something?
Maybe I'm getting confused between having a "sue" template folder. Do I not need the extra folder in the /languages directory?
Thank you.
Sue
Zen Follower
I am not very clear on what your problem is Sue, but it does sound like an 'overrides' issue. From your question if I understand your explanation correctly then yes your folder structure should be the same on both your FTP site, and your local site. Indeed that was my problem, and was what I had overlooked.
As a general rule of thumb, I find it useful to know that if a particular file needs modifying I will look in the folder where it originally comes from and if I see a folder named 'classic' in that same place, then i know I should create my own overrides folder there, (in your case a folder called sue) and copy the file into my newly created folder.
Good luck with your cart :)
Totally Zenned
sue4ster:
However, I changed includes/languages/english/meta_tags.php and got the result I wanted. I saved that file into my includes/languages/sue/ folder and uploaded that into the includes/languages directory with some slight changes to the file. Those changes do not show up on the site.Hi Sue
Your version of the meta_tags file should be includes/languages/english/sue/meta_tags.php
Zen Follower
kuroi:
Hi Sue
Your version of the meta_tags file should be includes/languages/english/sue/meta_tags.php
Ahah, I was wondering why my overrides weren't working there. The 'classic' folder should really be removed from that directory as it gives a false impression. I've fallen for that twice now.
Totally Zenned
I think that the reason people take a long time to get the overrides system is because there are two structurally different override systems in operation. So just when you think you've got it, it seems to not work when you try to use it somewhere else. Specifically, language and module overrides operate in the same way as each other, and using the same principle but a different file structure to template overrides.
Template overrides operate in parallel with template_default. By this I mean that (for example)
includes/templates/template_default/customer/tpl_header.phpcan be overridden by
includes/templates/YOUR_TEMPLATE/customer/tpl_header.phpLanguage and module overrides however, operate hierarchically. For example to override
includes/languages/english/meta_tags.phpyou would go to the files location and create a directory with the same name the directory in which your template_info file is located in templates and then place your override file in the new directory, i.e.
includes/languages/english/YOUR_TEMPLATE/meta_tags.php
What this means is that the directory to which I think you are referring (languages/classic) is appropriate, but the only files you would put in there (assuming for some unfathomable reason you are actually using the "Classic Template") are your english.php, french.php, german.php, spanish.php, japanses.php, etc. Other language files would be sitting lower in the hierarchy such as languages/english/classic/header.php.
I do however agree with your point about removing the directory, though I would do so in the wider context of removing the whole template (and I know of one web host who offers an installation service who has done exactly that). I'm personally finding that upgrading sites from 1.2 to 1.3 is easiest and most effectively done by upgrading the database but rebuilding the design using the template_default rendering Classic irrelevant. Hopefully the Dev Team will strip it out of the next version Zen Cart and make it available as a download for those preferring more traditional approaches.
Zen Follower
I'm having the same trouble but none of the solutions in this thread work for me.
My structure appears to be correct. Here's a screen shot to avoid any confusion:
http://www.binkwaffle.com/english_php.jpg
I can't see what I'm doing wrong but there's got to be something wrong. the only override that's not working is english.php. meta_tags.php and the others are working but not english. I've edited the copyright info and Categories title but neither change shows up. However, if I edit the original english.php the changes do show up.
Weird.
Totally Zenned
The language.php file (e.g. english.php) should be one level up from the other language files for that language. So in your case the file path should be includes/languages/custom_fz/english.php.
Tell staff why this post should be reviewed.