how to fix if en-gb.php language file not working in only admin

user4327290

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. enter image description here

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']                = ',';
Dmitriy Zhuk

here are the steps I would take to troubleshoot this issue:

  1. check the language settings in admin -> system -> localization -> language. this is how it should look http://joxi.ru/eAOYwZkU9EDEDm enter image description here

  2. 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 enter image description here

  3. then check the opencart language editor at admin -> design -> language editor. should look like this http://joxi.ru/E2p1aYlS7VxVEA enter image description here

  4. 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 enter image description here

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

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

  1. the language file eb-gb (which is also the name of the language directory) in admin is loaded by the controller admin/startup/startup.php on line 27
$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 enter image description here

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

  1. if that is correct, there is one more place to check. in admin/event/language.php you may have some issues. add this code on line 9
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 enter image description here

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.

  1. If none of this helps, send us a ticket at https://dreamvention.ee/support and I will personally take a look.

Hope this helps.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

PHP file_get_contents() not working how to fix

How to deal with a 50GB large csv file in r language?

how to fix bootstrap not working in php file in layout/index.php while using modularity technique?

How to fix "containing working copy admin area is missing" in SVN?

Declaration is only valid at file scope how to fix?

Creation of 1.3 GB file takes only 1 second. How?

How to fix this 2 issue by php (edit user from admin)?

Windows PHP Replacing SHA1_FILE >= 2GB error fix

how to fix a spreadsheet language?

How to fix fadeOut effect only working once in jquery?

Matplotlib is only working with marker style graphs, how do I fix that?

Discord bot only working in pm, how can i fix this?

How can i fix it? sticky navbar working only in first div

PHP Unexpected end of file how to fix?

How to open a text file in current working directory with `gedit admin://`?

My PHP code is working but "printf or echo" statement is not! How to fix it?

How to fix read-only file-system on 18.04

How to fix "sudo: unable to open ... Read-only file system"?

How to fix only one item from a list being added to a file

How to Fix a File Output PrintStream that Only Produces Blank Files

Flutter Objectbox how to fix "Read Only File System" Code 30?

How to fix Random php code is prepended on each php file in the server

Allow only Admin to delete a file?

How to fix Unsupported language admob

Can only run php file in Python by changing to the working directory

AJAX request to fill a popover working only once to a php file

How javascript language is working

How to turn on/off a php file while in admin page?

How do i fix php my admin adding multiple line records as one record