How to work with language variables in OpenCart ocStore?

Colleagues, prompt, please. Trying to add a language variable.

Procedure:

1. Added a translation of the language file in header.php in the folder ru-ru

$_['preim1head'] = 'Title advantages 1';
$_['preim1desc'] = 'Description advantages 1';


2. Added output to the controller header.php

// The advantages
$data['preim1head'] = $this->language->get('preim1head');
 $data['preim1desc'] = $this->language->get('preim1desc');


3. Put in the header.tpl

<h4><?php echo $preim1head; ?></h4>

4. Updates the cache in the supplements.

The output in the desired section, get the name of the variable, not the text specified in the language file.

CANT?
March 12th 20 at 08:06
1 answer
March 12th 20 at 08:08
Solution
Don't forget to switch the language when you edit files! And update the cache. This instruction works!

Find more questions by tags OpenCartocStore