Post by ahmed_5187 » Sat Mar 23, 2013 8:43 am

Hello all

in my site i have only 2 languages installed, i want only the unselected language icon to appear on the page. for example, i have english and french languages, when i'm on the English page I want only the french flag to be up there, not both.

any idea how can i do that?

thanks you in advance

Newbie

Posts

Joined
Wed Mar 20, 2013 1:22 am

Post by straightlight » Sat Mar 23, 2013 10:10 pm

In catalog/controller/module/language.php file,

find:

Code: Select all

if ($result['status']) {
replace with:

Code: Select all

if ($result['status'] && (!empty($this->data['language_code']) && html_entity_decode($result['code'], ENT_QUOTES, 'UTF-8') != html_entity_decode($this->data['language_code'], ENT_QUOTES, 'UTF-8')) || (empty($this->data['language_code']))) {
Last edited by straightlight on Wed Mar 27, 2013 12:17 pm, edited 1 time in total.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ahmed_5187 » Tue Mar 26, 2013 4:26 pm

i did the replace but i cant find the icons anymore. notice i'm using OC 1.5.4.1

Newbie

Posts

Joined
Wed Mar 20, 2013 1:22 am

Post by straightlight » Wed Mar 27, 2013 12:18 pm

Code modified above.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by OSWorX » Wed Mar 27, 2013 12:58 pm

ahmed_5187 wrote:i did the replace but i cant find the icons anymore. notice i'm using OC 1.5.4.1
You should check also the view template (language.tpl).
There is a check (1st line) to display only if languages > 1

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by ahmed_5187 » Wed Mar 27, 2013 6:09 pm

@straightlight ... still no icons.

@OSWorX .. i dont understand what i should do in language.tpl

Newbie

Posts

Joined
Wed Mar 20, 2013 1:22 am

Post by straightlight » Wed Mar 27, 2013 9:40 pm

Remove:

Code: Select all

<?php if (count($languages) > 1) { ?>
and the last:

Code: Select all

<?php } ?>
in your language.tpl file.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ahmed_5187 » Wed Mar 27, 2013 11:12 pm

thank you very much guys, this is amazing 100% working

Newbie

Posts

Joined
Wed Mar 20, 2013 1:22 am
Who is online

Users browsing this forum: No registered users and 1 guest