Post by Tiger-Web » Wed Jul 11, 2012 7:11 pm

Hi, I want to delete the flag that show for language and replace them by simple text. I have found in catalog/view/theme/myTheme/template/module/language.tpl that this is where I have to do it, but by default link are made in javascript. I have not understand how to make them is html or php.

I have try this code, the language show in text, but links are incorrect.

Code: Select all

<a href="index.php?language=<?php echo $language['code']; ?>"><?php echo $language['name']; ?>
You can also see the site

Default code from opencart

Code: Select all

<img src="image/flags/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" title="<?php echo $language['name']; ?>" onclick="$('input[name=\'language_code\']').attr('value', '<?php echo $language['code']; ?>'); $(this).parent().parent().submit();" />
Thank for your help

OpenCart version : 1.5.3.1


Newbie

Posts

Joined
Wed Jul 11, 2012 7:05 pm

Post by greensolef » Fri Jul 13, 2012 8:22 am

if you can't able to do this in your php code, then you can HIDE it through CSS...
simply follow the steps below:

- from your FTP, locate the file and edit the catalog/view/theme/default/stylesheet/stylesheet.css
- search the css code:

#language img {
cursor: pointer;
margin-right: 5px;}

- ADD display: none; after margin-right: 5px;
- SAVE and UPLOAD

here's the result:
http://www.webpagescreenshot.info/i/554 ... 1824am.png

THAT'S IT!

Hope it helps ;)

New member

Posts

Joined
Tue Jul 03, 2012 2:20 pm

Post by Tiger-Web » Fri Jul 13, 2012 8:02 pm

Thank for you help
The image are hide, but I can't get the right url to do links on, language doesn't switch.

I'm wondering why language don't switch when using url like : index.php?language=en

OpenCart version : 1.5.3.1


Newbie

Posts

Joined
Wed Jul 11, 2012 7:05 pm
Who is online

Users browsing this forum: No registered users and 24 guests