Reputation: 41
I am trying to make the main logo of the store change when I change language.
My company has a different name in English (originally in Hebrew).
Upvotes: 2
Views: 319
Reputation: 898
As you are using OC 2.X then you can get the Language code in header.tpl file like this
$session = new Session();
$lang = $session->data['language'];
echo $lang // out put will be 'en' for enlgish
Then you can place condition to change the image URL, also you can place condition in header controller so controller will send the appropriate logo URL in $logo
variable.
Upvotes: 2
Reputation: 648
$lang = $this->language->get('code');
use this line of code to check your language and then use if else to set your logo.
Upvotes: 1