language

OpenCart language error: Could not load language…

OpenCart language errors can be hard to tackle sometimes, because there can be many possible causes. What you need to do first is remember very well what you have changed recently and you’ll know where to look.

Possible causes and solutions

You have missing language file(s)

Example error message goes like this
Error: Could not load language english/common/header!

Solution

This one is very easy to solve, once you know which one is the missing file. :-) Note the bold part. This is the answer. 

You are missing catalog/language/english/common/header.php. Download OpenCart’s installation archive and upload the missing language file.

Odd file/directory permissions

Sometimes you might have wrong directory permissions, which prevent the language files from loading. Like the other day, I came across an OpenCart backup gone wrong with directory permissions set to 777 and this stopped php scripts from loading.

Solution

Make sure your language directory permissions are set to 644.

You have changed your admin directory name

If you have changed your admin directory name, then you have modified /admin/config.php.

Solution

Go to the /admin directory and open config.php. Check if
define('DIR_LANGUAGE',
points to where the actual language directory is. For example, if the value is /public_html/admin/language and your admin directory is now called admin_new, you need to change this path to /public_html/admin_new/language  

You are using a custom theme

Chances are that if you’re using a custom OpenCart theme, it has it’s own language files.

Solution

Check the official theme website to find translations of the theme or instructions on how to add language files. For example, if you’re using Shoppica theme, they have guidelines on how to translate it.

Receive a curated list of the best OpenCart tips & tricks

Delivered in your inbox weekly for free.

More OpenCart Tutorials

Leave a Reply

Your email address will not be published. Required fields are marked *