A
A
azaza2019-11-30 17:26:29
opencart
azaza, 2019-11-30 17:26:29

Opencart 2 - localization, problem?

Good time
, I am translating the elements of the template, so that it would work correctly when changing languages
​​​​because NUB in php, I encountered such a problem,
for example. created in header.tpl added in header.php language file<?php echo $text_new-brand; ?>

$_['text_new-brand']          = 'Новый производитель';

added in header.php controller
$data['text_new-brand'] = $this->language->get('text_new-brand');

Everything is displayed great,
but there is a section in which it does not work, I don’t know how to write it down correctly here
<?php global $config;?>
<?php if($config->get('control_fb_url') != '') { ?>
 <a href="<?php echo $config->get('control_fb_url'); ?>" target="_blank"> <img class="socimg" data-toggle="tooltip" data-placement="bottom" src="catalog/view/theme/magazin/image/fb1.png" alt="Facebook" title='<?php echo $text_сs1; ?>'>
</a>
<?php } ?>
<?php } ?>

I’m trying to do this in the title meta tag, but it doesn’t work, as
I understand it, it doesn’t work because it’s open Tell me how to display globalconfig Thank you <?php global $config;?>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question