Page 1 of 2
Error on language.php
Posted: Sun Oct 02, 2011 6:38 am
by xaknet
Hi , today I upload new theme for version 1 5 1 3, and install, the theme works good, but when I install Latest Product module in my theme and go to te site I see this error
Code: Select all
Notice: Error: Could not load language module/lpbc! in ../system/library/language.php on line 26
How I can fix it?? Please help
Re: Error on language.php
Posted: Sun Oct 02, 2011 6:42 am
by Daniel
Re: Error on language.php
Posted: Sun Oct 02, 2011 7:09 am
by Qphoria
Glad to see you added language fallback back in. But this way is limited and only works at the file level, instead of each individual entry
Instead you should load english first, then load the specific, this way any ones that the specific ones have will overwrite the existing english versions, and any of the variables the specific language doesn't have, will fallback to english.
I've attached the version I made in 1.4.9.x and it has been working fine all along and has all the checks in place. I believe you will want to add this one to the core.
Users can drop it into system/library and overwrite the existing. This version works with 1.4.0 through 1.5.1.3
Re: Error on language.php
Posted: Mon Oct 03, 2011 10:16 pm
by Daniel
as long as it does nto display this message:
Error: Could not load language module/lpbc
its fine.
Re: Error on language.php
Posted: Tue Oct 04, 2011 12:09 am
by Qphoria
Daniel wrote:as long as it does nto display this message:
Error: Could not load language module/lpbc
its fine.
Well it comes down to preference
1. Your version, Language fallback at the file level
- it will show english for files that are missing
- it will show the
variable name (e.g. "text_name") for individual entries that are missing
- it will die fatally and kill the site if the english version of the file doesn't exist
2. My version, Language fallback at the file level
- it will show english for files that are missing
- it will show the
english value for individual entries that are missing
- it will show the
variable name (e.g. "text_name") for files that are missing
- it will never die fatally.
Which is preferred?
Re: Error on language.php
Posted: Sat Oct 08, 2011 1:41 am
by markman-b
2
Re: Error on language.php
Posted: Sat Oct 08, 2011 2:08 pm
by iogames
2. My version, Language fallback at the file level
- it will show english for files that are missing
- it will show the english value for individual entries that are missing
- it will show the variable name (e.g. "text_name") for files that are missing
- it will never die fatally.
Which is preferred?
Ok in my case, my default language is other than english, I copy the translations files from modules/ I install to the other language's pack...
So it does change de code if my language is other than english?
Re: Error on language.php
Posted: Sat Oct 08, 2011 2:21 pm
by iogames
Well since I changed the language.php I got this error when I change Languages
Warning: Cannot modify header information - headers already sent by (output started at /home/chirigua/public_html/catalog/language/spanish/common/header.php:1) in /home/chirigua/public_html/system/engine/controller.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /home/chirigua/public_html/catalog/language/spanish/common/header.php:1) in /home/chirigua/public_html/system/engine/controller.php on line 29
Re: Error on language.php
Posted: Sat Oct 08, 2011 5:31 pm
by i2Paq
iogames wrote:Well since I changed the language.php I got this error when I change Languages
Warning: Cannot modify header information - headers already sent by (output started at /home/chirigua/public_html/catalog/language/spanish/common/header.php:1) in /home/chirigua/public_html/system/engine/controller.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /home/chirigua/public_html/catalog/language/spanish/common/header.php:1) in /home/chirigua/public_html/system/engine/controller.php on line 29
And after that you used our FREE search to look for "headers already sent" to find out that this has to do with white spaces in you language files after
?>.
The error also tells you which file: catalog/language/spanish/common/header.php
Re: Error on language.php
Posted: Sat Oct 08, 2011 5:37 pm
by markman-b
to doe??? Hahaha.

Re: Error on language.php
Posted: Sat Oct 08, 2011 6:53 pm
by i2Paq
markman-b wrote:to doe??? Hahaha.


Re: Error on language.php
Posted: Sat Oct 08, 2011 9:06 pm
by Qphoria
iogames wrote:
2. My version, Language fallback at the file level
- it will show english for files that are missing
- it will show the english value for individual entries that are missing
- it will show the variable name (e.g. "text_name") for files that are missing
- it will never die fatally.
Which is preferred?
Ok in my case, my default language is other than english, I copy the translations files from modules/ I install to the other language's pack...
So it does change de code if my language is other than english?
You "could" change the default language for fallback, but realistically, english is the only language that comes with opencart. English is the only language guaranteed to ALWAYS have the latest entries. So english should ideally never be removed.
But still, if another language is used for fallback, and it doesn't have the latest entries, it will just show the raw variable names like "text_name", "entry_number" until you update the file. So it won't really change anything. You just change the word "english" in that language.php file to your language.
Re: Error on language.php
Posted: Sat Oct 08, 2011 9:13 pm
by i2Paq
Qphoria wrote:
But still, if another language is used for fallback, and it doesn't have the latest entries, it will just show the raw variable names like "text_name", "entry_number" until you update the file. So it won't really change anything. You just change the word "english" in that language.php file to your language.
That is....., if these is no language related FILE missing.
Re: Error on language.php
Posted: Sun Oct 09, 2011 12:40 am
by iogames
FILE missing? Ok I will check for that, I took a free package so it might be...
I'm a newbie so you should understand, I'm very good at Wordpress but it's my first time with OC
I did what I was suggested now I get this error:
Warning: Cannot modify header information - headers already sent by (output started at /home/chirigua/public_html/catalog/language/spanish/common/header.php:1) in /home/chirigua/public_html/system/engine/controller.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /home/chirigua/public_html/catalog/language/spanish/common/header.php:1) in /home/chirigua/public_html/system/engine/controller.php on line 29
I just found a white space before ?> in layout.php, no more, and I manually checked the 2 header.php files...
Re: Error on language.php
Posted: Sun Oct 09, 2011 2:21 am
by i2Paq
iogames wrote:FILE missing? Ok I will check for that, I took a free package so it might be.....
What version of OpenCart is the language pack compatible with?
Have a look at:
[Tutorial] Upgrade older languagepacks.
Re: Error on language.php
Posted: Sun Oct 09, 2011 4:34 am
by iogames
Yeah nobody told me...
1. I took an old spanish pack
2. it comes with a bunch of extra files and missing files and missing lines
3. I installed 2 plugins, followme and shopping cart, so none of them even the spanish pack mentioned that I need to install for every addon 1 file for /admin/module and 1 file for /catalog/module [wherever is necessary]
4. extra files cause problems? cause I see one carousel.php that doesn't belong to Opencart v1.5.1.3.1
So am I missing something? the logic for OC is different to other scripts like phpFox or WP that I use all the time...
Re: Error on language.php
Posted: Sun Oct 09, 2011 5:39 am
by iogames
Wow! half day! but I solved, the spanish version that it's for free is a real mess...
So I translated header.php 's again and problem solved...
So for the next person that have problems...
- for every addon that you install, please add 2 language files on yourlanguage/module/ [admin & catalog]
Re: Error on language.php
Posted: Sun Oct 09, 2011 6:33 pm
by i2Paq
iogames wrote:Wow! half day! but I solved, the spanish version that it's for free is a real mess...
So I translated header.php 's again and problem solved...
So for the next person that have problems...
- for every addon that you install, please add 2 language files on yourlanguage/module/ [admin & catalog]
You could update that Spanish Language pack and then share it with others.
This would be nice to do so others would benefit from your hard work.
The only up-to-date Spanish Language Pack is the one you must buy.
I'm sharing my Dutch Language Pack for FREE to

Re: Error on language.php
Posted: Fri Feb 03, 2012 8:36 pm
by loukiad
I use OC 1.5.1.3, greek language and have all the files translated. When I want to sent a notification email to the customer that the order is shipped or whatever I get an error message saying that
Notice: Error: Could not load language greek! in /home/www/ilias/psistis.gr/www/vqmod/vqcache/vq2-system_library_language.php on line 27
The idea of Qphoria solves partly the problem because that way it sends the email in English.
Qphoria wrote:
Glad to see you added language fallback back in. But this way is limited and only works at the file level, instead of each individual entry
Instead you should load english first, then load the specific, this way any ones that the specific ones have will overwrite the existing english versions, and any of the variables the specific language doesn't have, will fallback to english.
I've attached the version I made in 1.4.9.x and it has been working fine all along and has all the checks in place. I believe you will want to add this one to the core.
Users can drop it into system/library and overwrite the existing. This version works with 1.4.0 through 1.5.1.3
But the problem is that I must have it it greek and I have all the right files translated.
Any ideas???
Re: Error on language.php
Posted: Fri Feb 03, 2012 11:26 pm
by Qphoria
loukiad wrote:
But the problem is that I must have it it greek and I have all the right files translated.
Any ideas???
If you are seeing it in english.. that means the greek version of that file doesn't exist.
Logically it checks...
if this exists 'catalog/language/<yourlang>/file.ext' then use it
otherwise use 'catalog/language/english/file.ext'
So you may be missing the necessary file or changing the wrong one.
Order notification emails in 15x are controlled by the catalog/language/<yourlang>/mail/order.php