Post by xaknet » Sun Oct 02, 2011 6:38 am

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

Newbie

Posts

Joined
Sat Oct 01, 2011 7:56 am

Post by Daniel » Sun Oct 02, 2011 6:42 am

change your languagte class with this one:

http://code.google.com/p/opencart/sourc ... n642&r=642

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Qphoria » Sun Oct 02, 2011 7:09 am

Daniel wrote:change your languagte class with this one:

http://code.google.com/p/opencart/sourc ... n642&r=642
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

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Daniel » Mon Oct 03, 2011 10:16 pm

as long as it does nto display this message:

Error: Could not load language module/lpbc

its fine.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Qphoria » Tue Oct 04, 2011 12:09 am

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?

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by markman-b » Sat Oct 08, 2011 1:41 am

2

OC version 1.5.4.1


Active Member

Posts

Joined
Wed Aug 24, 2011 7:13 pm

Post by iogames » Sat Oct 08, 2011 2:08 pm

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?

New member

Posts

Joined
Sat Oct 08, 2011 9:08 am

Post by iogames » Sat Oct 08, 2011 2:21 pm

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

New member

Posts

Joined
Sat Oct 08, 2011 9:08 am

Post by i2Paq » Sat Oct 08, 2011 5:31 pm

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

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by markman-b » Sat Oct 08, 2011 5:37 pm

to doe??? Hahaha. ;)

OC version 1.5.4.1


Active Member

Posts

Joined
Wed Aug 24, 2011 7:13 pm

Post by i2Paq » Sat Oct 08, 2011 6:53 pm

markman-b wrote:to doe??? Hahaha. ;)
:bang:

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Qphoria » Sat Oct 08, 2011 9:06 pm

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.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by i2Paq » Sat Oct 08, 2011 9:13 pm

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.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by iogames » Sun Oct 09, 2011 12:40 am

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...

New member

Posts

Joined
Sat Oct 08, 2011 9:08 am

Post by i2Paq » Sun Oct 09, 2011 2:21 am

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.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by iogames » Sun Oct 09, 2011 4:34 am

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...

New member

Posts

Joined
Sat Oct 08, 2011 9:08 am

Post by iogames » Sun Oct 09, 2011 5:39 am

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]

New member

Posts

Joined
Sat Oct 08, 2011 9:08 am

Post by i2Paq » Sun Oct 09, 2011 6:33 pm

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 ;)

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by loukiad » Fri Feb 03, 2012 8:36 pm

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:
Daniel wrote:change your languagte class with this one:

http://code.google.com/p/opencart/sourc ... n642&r=642
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???

New member

Posts

Joined
Fri Oct 28, 2011 11:45 pm

Post by Qphoria » Fri Feb 03, 2012 11:26 pm

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

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 80 guests