Reputation:
I have problem in Opencart 3.0.2.0 in all language file showing their text and variable in page and working perfectly in admin except en-gb.php. Please see below image.
I have try to debug but couldn't fix it.I also checked "storage" modification file to see if any file overwritten but it is same code all place.
you can see this code below already written in en-gb.php but its variable value not showing in any page of admin.
$_['code'] = 'en';
$_['direction'] = 'ltr';
$_['date_format_short'] = 'd/m/Y';
$_['date_format_long'] = 'l dS F Y';
$_['time_format'] = 'h:i:s A';
$_['datetime_format'] = 'd/m/Y H:i:s';
$_['decimal_point'] = '.';
$_['thousand_point'] = ',';
Upvotes: 1
Views: 1245
Reputation: 767
here are the steps I would take to troubleshoot this issue:
check the language settings in admin -> system -> localization -> language. this is how it should look http://joxi.ru/eAOYwZkU9EDEDm
check the opencart store settings in admin -> system -> settings -> edit your store and visit tab local. is should look like this http://joxi.ru/nAyxya7FgGbGv2
then check the opencart language editor at admin -> design -> language editor. should look like this http://joxi.ru/E2p1aYlS7VxVEA
if all is correct there, lets check the code. in admin/language/en-gb/en-gb.php. should look like this http://joxi.ru/V2VLwxqSdVqVyr
then check if there are any modifications to the language file at system/storage/modifications/admin/language/en-gb/en-gb.php (the file should not exist)
if you have vqmod installed, I would also check the cache in vqmod/vqcache/...
if all of this is correct, we need to dig deeper into the core of OpenCart
$language->load($this->config->get('config_admin_language'));
so you can start by checking this code by returning the value after it like this:
$language->load($this->config->get('config_admin_language'));
//this will output everything that is currently in the languge ibject.
print_r($language);
it should look like this http://joxi.ru/l2ZRw70szkLLl2
If it doesn't return an array, the issue could be that this code is not loaded properly OR that the result is somewhere overwritten by an empty array.
If your store has modifications, you will need to check the system/storage/modifications and search for any code that could be doing something similar
public function index(&$route, &$args) {
foreach ($this->language->all() as $key => $value) {
if (!isset($args[$key])) {
$args[$key] = $value;
}
}
// this will output the current values of the language object with the route name.
echo $route;
echo '<pre>';
print_r($args);
echo '</pre>';
}
it should look like this http://joxi.ru/DmBL9V6SJPWjWA
if at some point after a specific route like common/footer
you see that the text_home is empty or missing, then you need to check that route and its modifications and see what happened there.
Hope this helps.
Upvotes: 1