Page 1 of 1

Delete language flag

Posted: Wed Jul 11, 2012 7:11 pm
by Tiger-Web
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

Re: Delete language flag

Posted: Fri Jul 13, 2012 8:22 am
by greensolef
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;

here's the result: ... 1824am.png


Hope it helps ;)

Re: Delete language flag

Posted: Fri Jul 13, 2012 8:02 pm
by Tiger-Web
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