Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Image button changing with language


boudey

Recommended Posts

Hi,

 

I have a navigation bar with buttons. The actual links are language dependant. I have 2 languages

But the images include text like, Home, News etc.

 

They go like that:

 

<td><a href=<?=tep_href_link('index.php')?>><img src=images/b01.gif width=95 height=30 border=0></a></td>

 

How can I have a second series of button for a second language?

Or is there another way around?

 

Thanks.

Link to comment
Share on other sites

You need a version of each button for each language.

 

Then save those images to the includes/languages/[language]/images/buttons folder.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

You need a version of each button for each language.

 

Then save those images to the includes/languages/[language]/images/buttons folder.

 

OK, Thanks Daemon.

 

But the only problem is the page on which the code is, is the header.php that is not part of any language folder.

So the current code picks up the image source directly, not dinamically language wise.

 

How do I do that then? Or am I missing a point?

Link to comment
Share on other sites

Change your code to be:

<td><a href="<?php echo tep_href_link('index.php') . '">' . tep_image_button('b01.gif', [need alt text here]); ?></a></td>

Note that the alt text for the buttons will need to be added to the appropriate includes/languages/[language].php file for each language.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...